[SQL] pg_dump : problem with grant on table columns

2011-11-15 Thread Brice André
Hello, I sometimes define some access rights on table columns instead of whole table. Everything works fine except when I perform a dump. When I dump a databse that contains such access rights, the pg_dump utility generates commands like this one : GRANT SELECT("Login") ON TABLE "Clients" TO "Age

[SQL] updating a sequence

2011-11-15 Thread John Fabiani
Hi, I have need of a statement that updates the sequence but uses a max() to find the number. alter sequence somename restart with (select max(pk) from sometable). I need this for automating an ETL (using pentaho). Postgres 8.4 Thanks in advance, Johnf -- Sent via pgsql-sql mailing list (pgs

Re: [SQL] updating a sequence

2011-11-15 Thread Richard Broersma
On Tue, Nov 15, 2011 at 8:06 AM, John Fabiani wrote: > alter sequence somename restart with (select max(pk) from sometable). > > I need this for automating an ETL (using pentaho). http://www.postgresql.org/docs/9.1/interactive/functions-sequence.html#FUNCTIONS-SEQUENCE-TABLE -- Regards, Richa

Re: [SQL] pg_dump : problem with grant on table columns

2011-11-15 Thread Craig Ringer
On Nov 15, 2011 9:46 PM, "Brice André" wrote: > > Hello, > > I sometimes define some access rights on table columns instead of whole table. Everything works fine except when I perform a dump. > > When I dump a databse that contains such access rights, the pg_dump utility generates commands like th

Re: [SQL] updating a sequence

2011-11-15 Thread John Fabiani
On Tuesday, November 15, 2011 08:33:54 am Richard Broersma wrote: > On Tue, Nov 15, 2011 at 8:06 AM, John Fabiani wrote: > > alter sequence somename restart with (select max(pk) from sometable). > > > > I need this for automating an ETL (using pentaho). > > http://www.postgresql.org/docs/9.1/int

Re: [SQL] updating a sequence

2011-11-15 Thread Samuel Gendler
On Tue, Nov 15, 2011 at 4:28 PM, John Fabiani wrote: > On Tuesday, November 15, 2011 08:33:54 am Richard Broersma wrote: > > On Tue, Nov 15, 2011 at 8:06 AM, John Fabiani > wrote: > > > alter sequence somename restart with (select max(pk) from sometable). > > > > > > I need this for automating a

Re: [SQL] updating a sequence

2011-11-15 Thread Scott Marlowe
On Tue, Nov 15, 2011 at 5:33 PM, Samuel Gendler wrote: > On Tue, Nov 15, 2011 at 4:28 PM, John Fabiani wrote: >> >> On Tuesday, November 15, 2011 08:33:54 am Richard Broersma wrote: >> > On Tue, Nov 15, 2011 at 8:06 AM, John Fabiani >> > wrote: >> > > alter sequence somename restart with (select

Re: [SQL] updating a sequence

2011-11-15 Thread Scott Marlowe
On Tue, Nov 15, 2011 at 8:46 PM, Scott Marlowe wrote: > On Tue, Nov 15, 2011 at 5:33 PM, Samuel Gendler > wrote: >> On Tue, Nov 15, 2011 at 4:28 PM, John Fabiani wrote: >>> >>> On Tuesday, November 15, 2011 08:33:54 am Richard Broersma wrote: >>> > On Tue, Nov 15, 2011 at 8:06 AM, John Fabiani

Re: [SQL] updating a sequence

2011-11-15 Thread Sam Gendler
Sent from my iPhone On Nov 15, 2011, at 7:49 PM, Scott Marlowe wrote: > On Tue, Nov 15, 2011 at 8:46 PM, Scott Marlowe > wrote: >> On Tue, Nov 15, 2011 at 5:33 PM, Samuel Gendler >> wrote: >>> On Tue, Nov 15, 2011 at 4:28 PM, John Fabiani wrote: On Tuesday, November 15, 2011 08: