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

learn more… | top users | synonyms

14
votes
2answers
20k views

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 ...
13
votes
1answer
10k views

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 ...
12
votes
2answers
11k views

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?
11
votes
2answers
9k views

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 ...
9
votes
4answers
13k views

“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 ...
7
votes
2answers
14k views

postgres ident authentication failed

I'm trying to set up django on a fresh Ubuntu VM. I'm following the tutorials along until I get to this: psycopg2.OperationalError: FATAL: Ident authentication failed for user "postgres" The ...
7
votes
4answers
514 views

I'm managing SQLite, MySQL and PostgreSQL databases and want a tool for this locally

I develop web applications on Mac OSX in SQLite, MySQL and PostgreSQL and these are then put on the webserver. I want to be able to take the brunt out of looking at the terminal locally when dealing ...
6
votes
1answer
11k views

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 ...
5
votes
3answers
9k views

Install postgresql 9.3 on ubuntu 12.04

I am attempting to install PG 9.3 on Ubuntu 12.04 ---- Begin output of apt-get -q -y install postgresql-client-9.3=9.3~beta1-1.pgdg12.4+2 ---- STDOUT: Reading package lists... Building dependency ...
5
votes
1answer
5k views

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; ...
5
votes
1answer
996 views

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 ...
5
votes
1answer
2k views

Connection to postgresql inside Virtualbox via portforwarding fails

I have a postgresql server inside a virtualbox created by vagrant. I have also set up a portforwarding from 5432 inside the box to 15432 on the host system via the Vagrant file. When connecting via ...
4
votes
1answer
2k views

How can I use UTF-8 on Linux from Windows 7 via PuTTY?

I use PuTTY on Windows 7 to access a Linux machine with Ubuntu 10.10. I think that Windows 7 is using Latin-1. But I need to use UTF-8 on the Linux machine and in a PostgreSQL database. How can I do ...
4
votes
2answers
6k views

How can I create a database in PostgreSQL on Windows 7?

I use Windows 7 on my own home computer. I have installed PostgreSQL and now I would like to create an database. I tried with createdb mydatabase but I got this error message: createdb: could not ...
4
votes
1answer
70 views

Is password required for restricted database servers [closed]

I have a dedicated Database server which is have PostgreSQL 9.1. This server has firewall. Only 10.0.0.3 is allowed to connect and access to this server via Firewall. All other requests from other ...
3
votes
2answers
1k views

PostgreSQL - syntax error

What is wrong with the following statement? GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO foo; I get this error ERROR: syntax error at or near "ALL" LINE 2: ON ALL TABLES ...
3
votes
3answers
195 views

heredoc prompts not passed in

I'm trying to automate the creation of a PostgreSQL user with a bash script. I'm specifying the initial password as prompted by the "createuser" command, and I'd like to do it in bash, which I think ...
3
votes
1answer
5k views

Postgresql has broken apt-get on Ubuntu

On ubuntu 12.04, whenever I try to install a package using apt-get I'm greeted by: The following packages have unmet dependencies: postgresql-9.1 : Depends: postgresql-client-9.1 but it is not going ...
3
votes
1answer
4k views

How to make PostgreSQL start at boot time in Ubuntu?

Every time I boot my computer, I need to start Posgtres manually via sudo /etc/init.d/postgresql-8.4 start It was an easy task to make it start automatically with Init in place: just add a symlink ...
3
votes
2answers
4k views

Incremental Backup for PostgreSQL 8.3

I'm looking for a way to make good incremental backups for a large (more than 100 GB) PostgreSQL 8.3 DB. I'm currently using pg_dump which isn't incremental and very slow in backup and restore, ...
3
votes
2answers
624 views

Are PostgreSQL's database files binary compatible between Windows, Linux and Mac OS X?

Assuming 64-bit OS editions on each and only one copy of PostgreSQL running at a time, can I host my PostgreSQL database files in Dropbox and expect binary compatibility on all three platforms? I've ...
3
votes
1answer
931 views

ubuntu: root password

Well, I don't know exactly how it happened. But, thing is if I issue a command which I need root priviliges an error message comes that says <user> does not have an entry in sudoers file I ...
3
votes
1answer
454 views

Ubuntu postgresql missing man pages, PGDATA, and critical commands

I installed postgresql as well as postgresql-doc, nevertheless it seems that ubuntu either does not put commands in my path, or if it does put them in my path, it removes the man pages for the ...
2
votes
3answers
396 views

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

I have recently installed Postgres 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 ...
2
votes
1answer
11k views

NOQUEUE: reject: Relay access denied

I recently setup a mail server following the instructions on linode.com (https://library.linode.com/email/postfix/postfix2.9.6-dovecot2.0.19-mysql) except I am using postgreSQL instead of mySQL. ...
2
votes
1answer
2k views

Searching a whole postgres db for a string

In phpmyadmin, I can easily search for text in the tables in my databases using the search tab. Was wondering if I can do the same with the postgres installed locally on my computer. I have looked at ...
2
votes
2answers
286 views

Install postgres without apt-get

I have access to a machine on a scientific hpc, and I'm setting up an environemnt to create a web application, made up basically of TOMCAT and postgresql. I cannot use another web server. The OS is ...
2
votes
1answer
7k views

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.
2
votes
1answer
2k views

PostGreSQL Authentication Failure with “trust” option

I'm trying to setup a PostGIS db using PostGreSQL 9.1 on Ubuntu 12.04. I've set up the database, created a user account "jay" with no password, added spatial functionality following section 2.5 here, ...
2
votes
2answers
591 views

Too Much Swapping, even though RAM is ~75% Empty

I have a VPS with 9GB RAM, 300GB HDD, 3 GB Swap, 7 Cores. The OS is CentOS 5.7 Final. I have postgres9.0 running on my machine, with proper tuning done (at least by book/wiki of PostgreSQL). What ...
2
votes
3answers
2k views

PostgreSQL Admin Tool for mac os X

I'm looking for desktop admin tool similar to phpPgAdmin for POstgreSQL in Mac os X . Any recomendation?
2
votes
1answer
5k views

How do I start Postgres on CentOS 6.5?

Whenever I try to start Postgres, it gives me an error. Even if I remove the directory it complains about, it still fails. [root@ip-172-31-15-65 init.d]# service postgresql start /var/lib/pgsql/data ...
2
votes
3answers
4k views

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. ...
2
votes
3answers
312 views

SSH without password doesn't work with user postgres

I've tried manually adding the pub key to authorized_keys and authorized_keys2. I've also double checked the permissions on .ssh (700) and authorized_keys (644). I can login without password on the ...
2
votes
2answers
839 views

Help installing postgres in ubuntu

I'm trying to install postgresql in the latest ubunutu, and I'm following these instructions. When I sudo -u postgres psql postgres I get this error: could not change directory to "/home/james" I'd ...
2
votes
1answer
2k views

How can I completely uninstall pgAdmin3 from OS X?

My pgAdmin3 install has run into a problem (windowing glitch that renders it unusable), and I want to try completely removing it from my system and installing it freshly to see if that resolves the ...
2
votes
2answers
222 views

2 instances of postgresql but I really need one

I happen to have 2 installed instances of postgresql at my machine: 9.1 and 9.2: sudo service postgresql status 9.1/main (port 5432): down 9.2/main (port 5433): down They are located at ...
2
votes
1answer
630 views

apt-get fails at everything in Ubuntu due to postgresql error - how to fix?

I've got a server with zoneminder, mysql, ffserver and some ffmpeg instances running on it, but for some reason everything seems to be tied to PostgreSQL. I noticed an error when loading the ...
2
votes
3answers
3k views

How do I install the Postgres command-line client (psql) on OS X using MacPorts?

I'm trying to install the Posgtres command-line client (typically psql on Linux). I've got postgres installed through MacPorts (postgresql90 and postgresql90-server) but still don't see the client ...
2
votes
1answer
1k views

How do I restore a Postgres database from file backups

I use Time Machine on my Mac to backup my system. I have just managed to clobber my Postgres database and would like to restore it using my Time Machine backups. The latest changes don't matter, so I ...
2
votes
1answer
210 views

Emacs M-x sql-postgres encryption

Is it possible to encrypt the connection established with M-x sql-postgres in Emacs? If so, how?
2
votes
1answer
729 views

Kaspersky blocks PostgreSQL 8.4.1 installation

I was just installing PostgreSQL 4.1 with Drupal and other tools. While the Setup was installing phpWiki.exe, Kaspersky blocked the Setup and quarantined two files: phpWiki.exe, and StackBuilder.exe ...
2
votes
1answer
20 views

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? ...
2
votes
2answers
468 views

Running a test database on RAM disk

Is it possible to create and start a Postgresql server as an unprivileged user with data directory owned by the same user? I want to run tests and create a test database for it, the data files being ...
2
votes
1answer
48 views

Why does `psql --file` misinterpret tilde?

Earlier I used pg_dump to create a database backup in my home directory called book_dump.sql. I want to restore the backup to an empty database called book. To restore the backup, I tried this ...
2
votes
1answer
1k views

Cannot start Postgres daemon after installing with Yum

I was trying to install Postgres 9.1.4 on Fedora 17 using Yum. If I do: sudo yum install postgres-libs sudo yum install postgres sudo yum install postgis All the installs appear to complete ...
2
votes
1answer
494 views

make pgrouting problem

I try to make pgrouting. What am I doing wrong? anton@anton-P4I45Gx-PE:~/src/pgrouting$ cmake -DWITH_TSP=ON -DWITH_DD=ON . -- POSTGRESQL_EXECUTABLE is POSTGRESQL_EXECUTABLE-NOTFOUND -- Found ...
2
votes
1answer
653 views

Services running multiple times?

I've installed a postgres db on my debian squeeze. There's a /etc/init.d/postresql to control the database. When I type pstree -c, I get two traces with postgresql. After /etc/init.d/postgresl stop I ...
2
votes
3answers
1k views

Superuser rights on postgres

How do I get superuser rights on postgres. I am among sudoers in Linux, but I don't have rights to create users in postgres. How can I gain superuser rights in postgres? This is my pg_hba.conf: # ...
2
votes
1answer
663 views

secure PostgreSQL installation

I want to install postgresql on my computer in such a way that no computer other than mine can see or access it. I'm installing this on my work computer to store some GIS data, I don't want to worry ...