[GENERAL] REQUEST: option to auto-generate new sequences with CREATE TABLE (LIKE)

2007-07-18 Thread Nico Sabbi
Hi, as the subjects reads I searched in the docs a way to instruct postgres to create new sequences when copying tables containing serial columns, but the resulting serial fields in the new tables reference the original sequence. Yes, there are workarounds, but having an option to make postgre

[GENERAL] Can't SELECT from (INSERT ... RETURNING)

2007-07-18 Thread Nico Sabbi
I thought I could use the output of INSERT...RETURNING as a set of tuples for a subquery, but it seems it's not the case: nb1=# select * from (insert into m(a) values(112) returning a); ERROR: syntax error at or near "into" LINE 1: select * from (insert into m(a) values(112) returni...

[GENERAL] row->ARRAY or row->table casting?

2007-09-28 Thread Nico Sabbi
Hi, is there any way to cast a generic row to an array or to a table type? The example is trivial, but it explains what I'm trying to do: nb1=# select * from tab1; a | t ---+--- 1 | a 2 | b 3 | c (3 rows) nb1=# select r from (select row(tab1.*) as r from tab1)x; r --- (1,a) (2,b) (3,c) (

Re: [GENERAL] row->ARRAY or row->table casting?

2007-09-28 Thread Nico Sabbi
Tom Lane ha scritto: Nico Sabbi <[EMAIL PROTECTED]> writes: is there any way to cast a generic row to an array or to a table type? "row(...)::composite_type" should work in 8.2 and up. regards, tom lane ---(

Re: [GENERAL] row->ARRAY or row->table casting?

2007-10-01 Thread Nico Sabbi
Gregory Stark ha scritto: "Nico Sabbi" <[EMAIL PROTECTED]> writes: nb1=# select r.a from (select row(tab1.*)::tab1 as r from tab1)x; ERROR: missing FROM-clause entry for table "r" LINE 1: select r.a from (select row(tab1.*)::tab1 as r from tab1)x;

Re: [GENERAL] ORDER BY - problem with NULL values

2007-10-12 Thread Nico Sabbi
Stefan Schwarzer ha scritto: From 8.3 beta release notes: - ORDER BY ... NULLS FIRST/LAST I think this is what you want right? Yes, indeed. Sounds great. unfortunately I am on 8.1. And wouldn't really want to migrate to 8.3 and beta for the moment order by 1 ? ---

[GENERAL] Inconsistence in transaction isolation docs

2007-10-16 Thread Nico Sabbi
/From: http://www.postgresql.org/docs/8.2/interactive/transaction-iso.html " Read Committed/ is the default isolation level in PostgreSQL. When a transaction runs on this isolation level, a SELECT query sees only data committed before the query began; it never sees either uncommitted data or c

Re: [GENERAL] Inconsistence in transaction isolation docs

2007-10-16 Thread Nico Sabbi
Albe Laurenz ha scritto: Nico Sabbi wrote: /From: http://www.postgresql.org/docs/8.2/interactive/transaction-iso.html " Read Committed/ [...] to me the above sentence sounds inconsistent: it's asserting that both 1) and 2) apply: 1) it never sees ... changes committed du

Re: [GENERAL] case dumbiness in return from functions

2008-01-18 Thread Nico Sabbi
Tom Lane ha scritto: Ivan Sergio Borgonovo <[EMAIL PROTECTED]> writes: After discovering that pg_get_serial_sequence behaves in a bit strange way[1] when it deals to case sensitiveness The SQL standard specifies that unquoted identifiers are case-insensitive. You're welcome to spell th

Re: [GENERAL] I can't drop a user if I don't drop his grants beforehand??????????????????

2009-05-29 Thread Nico Sabbi
Alvaro Herrera ha scritto: Nico Sabbi wrote: Hi, i can't believe my eyes. Why on earth I can't drop a user without previously revoking his privileges? This is really _crazy_ in my opinion. I'm not speaking of object ownership, but of GRANTs. As Tom says, it'

[GENERAL] I can't drop a user if I don't drop his grants beforehand??????????????????

2009-05-22 Thread Nico Sabbi
Hi, i can't believe my eyes. Why on earth I can't drop a user without previously revoking his privileges? This is really _crazy_ in my opinion. I'm not speaking of object ownership, but of GRANTs. Why? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] I can't drop a user if I don't drop his grants beforehand??????????????????

2009-05-22 Thread Nico Sabbi
Tom Lane ha scritto: Nico Sabbi writes: i can't believe my eyes. Why on earth I can't drop a user without previously revoking his privileges? Yeah, it's a known limitation. The reason it's not implemented is that some of the privileges may be in other d

[GENERAL] Help setting up warm standby replication

2007-04-14 Thread Nico Sabbi
Hi, after having read the documentation and the few posts in this list I tried to set up a warm standby replication between two instances of postgres running on my pc in 2 different base directories and 2 different ports. (The second one was a cp -a of the first one after having created a bac

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Nico Sabbi
Tom Lane wrote: Nico Sabbi <[EMAIL PROTECTED]> writes: To begin with I followed the example of the docs: in the recovery.conf file of the slave instance I set restore_command = 'cp -av /var/lib/pgsql/data/pg_xlog/%f %p' Hm, it looks like you are try

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Nico Sabbi
Merlin Moncure wrote: On 4/16/07, Nico Sabbi <[EMAIL PROTECTED]> wrote: Is there any parameter that I have to pass to the second server to keep on requesting WALs? I still don't understand what instructs the server to continously request the master's logs. google pg_stand

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Nico Sabbi
Merlin Moncure wrote: try link mode, not copy mode (-l). make sure you read about the -k switch. merlin replaced -c with -l, but the result was the same. I assume that with -k you mean the socket dir for postgres - since pg_standby doesn't seek to recognize that switch - but I didn't ne

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Nico Sabbi
Nico Sabbi wrote: Merlin Moncure wrote: try link mode, not copy mode (-l). make sure you read about the -k switch. merlin replaced -c with -l, but the result was the same. I assume that with -k you mean the socket dir for postgres - since pg_standby doesn't seek to recognize

[GENERAL] Some problem with warm standby server

2007-04-27 Thread Nico Sabbi
Hi, I have some doubts regarding the settings and the access procedure of warm standby servers: - can autovacuum be safely enabled on the replicator? - I'm using pg_standby (from cvs) that is generally working well as expected (logs are copied with scp); today I wanted to temporarily stop the

Re: [GENERAL] Some problem with warm standby server

2007-05-08 Thread Nico Sabbi
Simon Riggs wrote: then I updated the master with a batch of inserts, but after a while the slave stopped with these messages: LOG: restored log file "00010021" from archive LOG: record with zero length at 0/2148 LOG: invalid primary checkpoint record LOG: restored log