Questions tagged [postgresql]

PostgreSQL is a community developed, open source, relational database, made available under a BSD-like license. The PostgreSQL documentation is expansive and incredibly useful.

PostgreSQL is the open source database started at UC-Berkeley back in 1986 as Postgres project. Today, PostgreSQL is an enterprise class RDBMS, one of the most powerful database engines available.

Strengths of PostgreSQL are high scalability and fault-tolerance. PostgreSQL is ACID compliant and conforms to the ANSI-SQL:2008 standard.

PostgreSQL includes the ability to use various programming languages including PERL, Python, R, and many others. It also allows several additional modules to add features and capabilities.

PostgreSQL is available under a liberal open source license. From the project website:

[The] license gives you the freedom to use, modify and distribute PostgreSQL in any form you like, open or closed source. Any modifications, enhancements, or changes you make are yours to do with as you please.

Typical Questions include:

Links:

For more information see the PostgreSQL homepage.
PostgreSQL Community
PostgreSQL Support

573 questions
94
votes
8 answers

"FATAL: lock file "postmaster.pid" already exists"

I just reinstalled postgres via brew install postgres I ran initdb /usr/local/var/postgres -E utf8 but got this: The files belonging to this database system will be owned by user "atal421". This user must also own the server process. The database…
AdamT
  • 1,103
54
votes
4 answers

Install libpq-dev on Mac OS?

Does anyone know how I can install libpq-dev on Mac OS 10.6? It's a pre-requisite for something else I want to install. There doesn't seem to be a macport for it, so how can I install it on a Mac?
Richard
  • 551
41
votes
4 answers

Prevent Postgresql from running at startup

At some point in the past, I had installed posgresql and I can't get rid of it: $ ps -A|egrep postg 232 ?? 287 ?? 0:00.02 postgres: logger process …
Paul
  • 461
  • 1
  • 5
  • 6
27
votes
1 answer

User permissions for creating PostgreSQL DB

I'm working on Ubuntu. Following is one of my commands. $ psql -U kuser -d postgres Then this connects to the database. But from postgres terminal when i try postgres=> CREATE DATABASE kdb; ERROR: permission denied to create database When I try a…
dinesh707
  • 395
27
votes
1 answer

PostgreSQL homebrew installation lacks config files

So I successfully installed PostgreSQL 9.1 on MacOSX Lion. Unlike people say, I didn't have to change the PATH and no other version of PostgreSQL was installed on the system ($ psql --version shows psql (PostgreSQL) 9.1.4). However, when I try to…
orion3
  • 722
27
votes
3 answers

How do I fix "Library not loaded: libssl.1.0.0.dylib" with PostgreSQL?

After deleting Macports, I've had some strange behaviour. When I try to run PostgreSQL via CLI, I get: pawel:~ pawel$ psql dyld: Library not loaded: /opt/local/lib/libssl.1.0.0.dylib Referenced from: /usr/local/bin/psql Reason: image not…
Simpleton
  • 821
25
votes
2 answers

Error while trying to start PostgreSQL installed via Homebrew: "Operation not permitted"

I have recently installed PostgreSQL on my Mac via Homebrew. (I may have already had it installed; it was not running.) brew install postgres ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents Now I am trying to start it with…
Andrew
  • 15,494
25
votes
4 answers

How do I execute/run a .sql file in PostgreSQL 9.2.6 + CentOs

I would like to know how to execute a .sql file in PostgreSQL. I'm using CentOs 6.4. I have created a database and just need to run a script given to me to create tables. Thanking you in advance.
20
votes
10 answers

Default password for postgreSQL

What is the default password for the "postgres" user when I install postgreSQL on Windows? I googled for "postgres default password" but it doesn't return any immediate result.
Chin
  • 8,013
20
votes
3 answers

How do I connect to a PostgreSQL server using LibreOffice Base?

I'm running into errors when I try to connect to a PostgreSQL server on the local machine using LibreOffice Base 3.5 (this applies to LibreOffice 4 as well): The following syntax (localhost:5432=; database name worktime) doesn't…
bwDraco
  • 46,683
18
votes
2 answers

Calling the psql command without selecting any database

The syntax of the psql command line client is psql [option...] [dbname [username]] I am passing the command ALTER DATABASE x RENAME to y to this command: echo `ALTER DATABASE x RENAME to y` | psql Currently I am getting the error psql: FATAL: …
Alex
  • 1,437
16
votes
5 answers

Setting up PostgreSQL gives error sudo: initdb: command not found

Step 1: I installed PostgreSQL using sudo apt-get install postgresql-9.1 as recommended on the PostgreSQL website Step 2: I tried to run postgres. It's not found. For whatever reason, the install doesn't appear to add it to the path? So I had to…
aardvarkk
  • 2,269
14
votes
1 answer

Is the order of columns significant in a Postgresql Primary key definition?

Postgresql allows you to define a primary key using a group of columns instead of one if desired, like so: PRIMARY KEY(a_id, b_id) But is the order of the columns in this definition significant? Is there any practical or actual difference between…
14
votes
2 answers

Any way to keep connection alive in pgAdmin without setting it on the server?

I am using postgres.heroku.com to host my databases. This means that I have no way of changing server settings. Therefore, the answer to this question does not help me. Heroku is not willing to change their settings (I have contacted them). I am…
David
  • 1,289
13
votes
3 answers

pgAdmin list of keyboard shortcuts

I've been using pgAdmin for several days and so far I like it. However, I can't find a list of keyboard shortcuts documented anywhere, either on the pgAdmin site, in the help, or in the options menu. I stumbled into one myself that is nowhere in the…
user2100746
1
2 3
38 39