Thread: pgsql-server/src/backend commands/sequence.c p ...
pgsql-server/src/backend commands/sequence.c p ...
From
momjian@postgresql.org (Bruce Momjian - CVS)
Date:
CVSROOT: /cvsroot Module name: pgsql-server Changes by: momjian@postgresql.org 03/02/13 00:25:25 Modified files: src/backend/commands: sequence.c src/backend/parser: gram.y Log message: Adds in NO MAXVALUE and NO MINVALUE options for create sequence per 200X spec, which will also make alter sequence a touch easier. sequence.c init_params() will check for settings which have been defined twice, and complain. Rod Taylor
Shouldn't this patch need some pg_dump changes? And doc changes? Maybe even psql changes? How is NO MAXVALUE and NO MINVALUE stored in the database? How are they recreated that way after a dump? Chris > -----Original Message----- > From: pgsql-committers-owner@postgresql.org > [mailto:pgsql-committers-owner@postgresql.org]On Behalf Of Bruce Momjian > - CVS > Sent: Thursday, 13 February 2003 1:25 PM > To: pgsql-committers@postgresql.org > Subject: [COMMITTERS] pgsql-server/src/backend commands/sequence.c p ... > > > CVSROOT: /cvsroot > Module name: pgsql-server > Changes by: momjian@postgresql.org 03/02/13 00:25:25 > > Modified files: > src/backend/commands: sequence.c > src/backend/parser: gram.y > > Log message: > Adds in NO MAXVALUE and NO MINVALUE options for create > sequence per 200X > spec, which will also make alter sequence a touch easier. > > sequence.c init_params() will check for settings which have been > defined twice, and complain. > > Rod Taylor > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org >
On Thu, 2003-02-13 at 02:21, Christopher Kings-Lynne wrote: > Shouldn't this patch need some pg_dump changes? And doc changes? Maybe > even psql changes? > > How is NO MAXVALUE and NO MINVALUE stored in the database? How are they > recreated that way after a dump? They're not stored. According to the spec they're simply aliases to the default values, as such we store the default values. I suppose if you wanted to make the dump portable to other databases one could store bools for these. > > -----Original Message----- > > From: pgsql-committers-owner@postgresql.org > > [mailto:pgsql-committers-owner@postgresql.org]On Behalf Of Bruce Momjian > > - CVS > > Sent: Thursday, 13 February 2003 1:25 PM > > To: pgsql-committers@postgresql.org > > Subject: [COMMITTERS] pgsql-server/src/backend commands/sequence.c p ... > > > > > > CVSROOT: /cvsroot > > Module name: pgsql-server > > Changes by: momjian@postgresql.org 03/02/13 00:25:25 > > > > Modified files: > > src/backend/commands: sequence.c > > src/backend/parser: gram.y > > > > Log message: > > Adds in NO MAXVALUE and NO MINVALUE options for create > > sequence per 200X > > spec, which will also make alter sequence a touch easier. > > > > sequence.c init_params() will check for settings which have been > > defined twice, and complain. > > > > Rod Taylor > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 6: Have you searched our list archives? > > > > http://archives.postgresql.org > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) -- Rod Taylor <rbt@rbt.ca> PGP Key: http://www.rbt.ca/rbtpub.asc
Attachment
I am not thrilled to see those huge integers in the dump file for sequences. It would be good to test for these in pg_dump and output those symbols instead. i don't think we need to store them as bools --- just make the tests to see if the values matches these symbol values. --------------------------------------------------------------------------- Rod Taylor wrote: -- Start of PGP signed section. > On Thu, 2003-02-13 at 02:21, Christopher Kings-Lynne wrote: > > Shouldn't this patch need some pg_dump changes? And doc changes? Maybe > > even psql changes? > > > > How is NO MAXVALUE and NO MINVALUE stored in the database? How are they > > recreated that way after a dump? > > They're not stored. According to the spec they're simply aliases to the > default values, as such we store the default values. > > I suppose if you wanted to make the dump portable to other databases one > could store bools for these. > > > > -----Original Message----- > > > From: pgsql-committers-owner@postgresql.org > > > [mailto:pgsql-committers-owner@postgresql.org]On Behalf Of Bruce Momjian > > > - CVS > > > Sent: Thursday, 13 February 2003 1:25 PM > > > To: pgsql-committers@postgresql.org > > > Subject: [COMMITTERS] pgsql-server/src/backend commands/sequence.c p ... > > > > > > > > > CVSROOT: /cvsroot > > > Module name: pgsql-server > > > Changes by: momjian@postgresql.org 03/02/13 00:25:25 > > > > > > Modified files: > > > src/backend/commands: sequence.c > > > src/backend/parser: gram.y > > > > > > Log message: > > > Adds in NO MAXVALUE and NO MINVALUE options for create > > > sequence per 200X > > > spec, which will also make alter sequence a touch easier. > > > > > > sequence.c init_params() will check for settings which have been > > > defined twice, and complain. > > > > > > Rod Taylor > > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > > TIP 6: Have you searched our list archives? > > > > > > http://archives.postgresql.org > > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 2: you can get off all lists at once with the unregister command > > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > -- > Rod Taylor <rbt@rbt.ca> > > PGP Key: http://www.rbt.ca/rbtpub.asc -- End of PGP section, PGP failed! -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
On Thu, 2003-02-13 at 14:00, Bruce Momjian wrote: > I am not thrilled to see those huge integers in the dump file for > sequences. It would be good to test for these in pg_dump and output > those symbols instead. i don't think we need to store them as bools --- > just make the tests to see if the values matches these symbol values. I have no problem with that -- but it does change the way pg_dump functions for pre-7.4 sequences. -- Rod Taylor <rbt@rbt.ca> PGP Key: http://www.rbt.ca/rbtpub.asc
Attachment
Rod Taylor wrote: -- Start of PGP signed section. > On Thu, 2003-02-13 at 14:00, Bruce Momjian wrote: > > I am not thrilled to see those huge integers in the dump file for > > sequences. It would be good to test for these in pg_dump and output > > those symbols instead. i don't think we need to store them as bools --- > > just make the tests to see if the values matches these symbol values. > > I have no problem with that -- but it does change the way pg_dump > functions for pre-7.4 sequences. We already don't support loading 7.4 dumps into pre-7.4 dumps, I thought. We can test the version we are dumping and only use the symbols for >- 7.4 --- don't we do that in other places? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Added to TODO: > * Allow pg_dump to dump sequences using NO_MAXVALUE and NO_MINVALUE --------------------------------------------------------------------------- Rod Taylor wrote: -- Start of PGP signed section. > On Thu, 2003-02-13 at 14:00, Bruce Momjian wrote: > > I am not thrilled to see those huge integers in the dump file for > > sequences. It would be good to test for these in pg_dump and output > > those symbols instead. i don't think we need to store them as bools --- > > just make the tests to see if the values matches these symbol values. > > I have no problem with that -- but it does change the way pg_dump > functions for pre-7.4 sequences. > > -- > Rod Taylor <rbt@rbt.ca> > > PGP Key: http://www.rbt.ca/rbtpub.asc -- End of PGP section, PGP failed! -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073