psql is the primary interactive terminal for PostgreSQL. (DO NOT USE THIS TAG for questions targeting PostgreSQL!)

learn more… | top users | synonyms

0
votes
1answer
51 views

Count for many-to-many relationship

I have the following tables: surveys properties owners_properties owners ---+------------ ---------- ------------+--------- ------ id | property_id id ...
4
votes
0answers
1k views

Is there a Postgres admin GUI that can execute a master file containing multiple sql files

I'm developing a really long script. I'd like to break the script into smaller, more manageable scripts and include each sql file in a master file, then just execute the master file. example: ...
1
vote
0answers
67 views

Does psql print command results to standard error?

I am running COPY command through psql 9.1.15 as a cronjob to append data in csv file to table1: psql -q -h $DB_HOST -d $DB_NAME -p $DB_PORT -U $DB_USER <<EOF copy table1 from ...
0
votes
0answers
101 views

pgAgent not working on linux (Ubuntu 14.04)

I am running Postgres 9.3 on Ubuntu 14.04 and I am unable to get pgAgent daemon/service to run. I have confirmed that the daemon is not running using service --status-all. When trying to run ...
0
votes
0answers
26 views

Send Keyboard Interrupt in PostreSQL psql console?

Is it possible to send a keyboard interrupt signal to the PostgreSQL psql console that will take me back to a new console command line? Sometimes I'll type a command incorrectly and then hit enter ...
0
votes
0answers
20 views

Is my system configuration restricting me to psql:i386?

When I try to run psql on 64 bit sid I get this error message: /usr/lib/postgresql/9.4/bin/psql: symbol lookup error: /usr/lib/postgresql/9.4/bin/psql: undefined symbol: PQconninfo I needed to run ...
0
votes
0answers
25 views

PGBouncer pausing hanging from ltm monitor

Currently I have the following setup: F5LTM --> PGBx2 --> DBx3 The PGBouncers are set up with priority groups on the F5 so in the event one fails or hangs traffic will still be sent to the database ...
0
votes
0answers
41 views

command-line arguments for postgresql

The following database restore command is failing because of too many command-line arguments (first is "151019_testbase.sql"). This is effected from a shell session within the directory of the ...
0
votes
0answers
327 views

Tomcat7 JDBC connection pool -> Connection has been abandoned

I have the following configuration for the JDBC connection pool initialSize="2" minIdle="10" maxIdle="50" maxActive="100" maxWait="15000" ...
0
votes
0answers
215 views

Import SQL & export CSV using Golang - how to escape backslash?

I'm trying using Golang for import SQL from /home/z/Documents/data.sql and export to CSV /tmp/filename.csv Since out of the box Golang access from inside psql, the import SQL command will be: \i ...
0
votes
0answers
307 views

psql: how to turn off context messages at raise notice

If I use raise notice, I get context messages at each execution. Can I turn them off and just get the NOTICE? NOTICE: d = [2,1] ,tn: (1,2,"{NULL,NULL}","{{-1,4},{-1,-1}}",1) CONTEXT: SQL ...
0
votes
0answers
108 views

Postgres 9.2 on Windows

Simple question, but utterly infuriating. Trying to use psql from a command prompt, but can't access any of the previous commands with the up/down cursors. I could also really do with finding out ...