Re: [GENERAL] Error message "psql: could not connect to server: No such file or directory"

2012-06-22 Thread Stefan Schwarzer
> sudo su - _postgres /usr/local/pgsql-9.1/bin/initdb -U postgres -D > /usr/local/pgsql-9.1/data --encoding=UTF8 --locale=en_US > sudo su - _postgres /usr/local/pgsql-9.1/bin/pg_ctl start -D > /usr/local/pgsql-9.1/data > > Although I don't get an error message, I don't have the feeling that it

Re: [GENERAL] Problem installing extensions on Lion

2012-06-22 Thread Stefan Schwarzer
>>> 1) Do the above files actually exist in the above location? > >> Yes, the c.h exist in the mentioned location. However, as it does not >> indicate where it looks for the stdio.h, perhaps the problem lies there. > > Indeed. Where did you get the advice to use "-isysroot > /Developer/SDKs/Mac

[GENERAL] pg_dump not dumping all tables

2012-06-22 Thread Stefan Schwarzer
Hi there, I am pg_dump-ing all tables from schema public on the server /usr/local/pgsql/bin/pg_dump -U user my_database --schema=public --encoding=UTF-8 > dump.sql and re-loading it via psql on my local machine. But instead of having 708 tables as on the server, I end up with only 570

Re: [GENERAL] pg_dump not dumping all tables

2012-06-22 Thread Alban Hertroys
On 22 June 2012 10:45, Stefan Schwarzer wrote: > Hi there, > > I am pg_dump-ing all tables from schema public on the server > >       /usr/local/pgsql/bin/pg_dump -U user my_database --schema=public > --encoding=UTF-8 > dump.sql > > and re-loading it via psql on my local machine. > > But instead

Re: [GENERAL] Starting a cluster as a service

2012-06-22 Thread Léa Massiot
Hi again, I'm running "PostgreSQL 9.1" under "Windows XP". I'm still trying to set a proper logging system for a PostgreSQL cluster "a_pg_cluster". In the cluster "postgresql.conf" configuration file, I uncommented "logging_connector = on". When I stopped + started the service, I could see a "pg_

[GENERAL] Extensions and roles for access administration

2012-06-22 Thread Виктор Егоров
Greetings. I've developed a small extension, that is essentially a collection of tables with a bunch of PL/pgSQL functions, that are API for the whole thing. Inside the extension script I am creating extra roles, and access to the extension's functions is provided using these extra roles. Given e

Re: [GENERAL] Starting a cluster as a service

2012-06-22 Thread Raghavendra
On Fri, Jun 22, 2012 at 5:36 PM, Léa Massiot wrote: > Hi again, > > I'm running "PostgreSQL 9.1" under "Windows XP". > I'm still trying to set a proper logging system for a PostgreSQL cluster > "a_pg_cluster". > > In the cluster "postgresql.conf" configuration file, I uncommented > "logging_conne

Re: [GENERAL] Extensions and roles for access administration

2012-06-22 Thread Tom Lane
=?UTF-8?B?0JLQuNC60YLQvtGAINCV0LPQvtGA0L7Qsg==?= writes: > - I've noticed, that after I DROP EXTENSION, all roles are still there in > the database. Is this expected? Roles are not considered to be part of an extension: they really can't be, since an extension is local to a database while a role

[GENERAL] insert select fails inside of function

2012-06-22 Thread Benedict Holland
Hi All, I am scratching my head over this one. I have a basic function which populates a table inside of it (declared outside of the function but that shouldn't matter) and it requires something like insert into table1 (col1, ...) select * from foo and I get the error "query has no destination

Re: [GENERAL] Extensions and roles for access administration

2012-06-22 Thread Виктор Егоров
Thanks, this clarifies things for me. There's DROP ROLE IF EXISTS, which I'm using. 2012/6/22 Tom Lane > > Roles are not considered to be part of an extension: they really can't > be, since an extension is local to a database while a role is global to > the whole installation. As per the docume

Re: [GENERAL] insert select fails inside of function

2012-06-22 Thread Tom Lane
Benedict Holland writes: > I am scratching my head over this one. I have a basic function which > populates a table inside of it (declared outside of the function but that > shouldn't matter) and it requires something like > insert into table1 (col1, ...) > select * from foo > and I get the err

Re: [GENERAL] insert select fails inside of function

2012-06-22 Thread Benedict Holland
Hi Tom, Thanks for the response. The PG version is 9.0. I can't really give you the text of the function unfortunately. I know though that there isn't any aliasing issues occurring. After commenting out all but one line, I have it down to, not a insert select but a create temp table t1(id, ...) a

Re: [GENERAL] insert select fails inside of function

2012-06-22 Thread Tom Lane
Benedict Holland writes: > Thanks for the response. The PG version is 9.0. I can't really give you the > text of the function unfortunately. I know though that there isn't any > aliasing issues occurring. After commenting out all but one line, I have it > down to, not a insert select but a > crea

Re: [GENERAL] Feature discussion: Should syntax errors abort a transaction?

2012-06-22 Thread Jeff Davis
On Wed, 2012-06-20 at 00:24 -0700, Chris Travers wrote: > I guess it seems to me that I would not object to a new option for > transaction behavior where one could do something like SET TRANSACTION > INTERACTIVE; and have no errors abort the transaction at all (explicit > commit or rollback require

Re: [GENERAL] retrieving function raise messages in ecpg embedded sql code

2012-06-22 Thread Jeff Davis
On Mon, 2012-06-18 at 21:35 +, Haszlakiewicz, Eric wrote: > I'm trying to get some additional information back from a trigger to my > embedded SQL > program, to essentially emulate Informix's way of generating serial values. > I can get the serial to be generated, but I'm trying to figure out

[GENERAL] configuring queries for concurrent updates

2012-06-22 Thread Robert Poor
[std_disclaimer]I'm not a DBA and I'm running PostgreSQL on a quad-core Intel laptop.  You may read on after you stop laughing...[/std_disclaimer] I've written a version of UPSERT designed to import a large number of records. It works in two steps: it UPDATEs incumbent records that share common k