dbTalk Databases Forums  

[BUGS] BUG #2245: pg_dump doesn't dump expressions with sequence in DEFAULT setting for some column in table

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2245: pg_dump doesn't dump expressions with sequence in DEFAULT setting for some column in table in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nikolay Samokhvalov
 
Posts: n/a

Default [BUGS] BUG #2245: pg_dump doesn't dump expressions with sequence in DEFAULT setting for some column in table - 02-07-2006 , 06:36 AM







The following bug has been logged online:

Bug reference: 2245
Logged by: Nikolay Samokhvalov
Email address: samokhvalov (AT) gmail (DOT) com
PostgreSQL version: 8.1.2
Operating system: Linux Fedora Core 4
Description: pg_dump doesn't dump expressions with sequence in
DEFAULT setting for some column in table
Details:

I use some expression as DEFAULT setting for some column of some table. For
example, nextval('myseq') * 10.
Then, I pg_dump my database and restore it. I see 'nextval('myseq')' (w/o
'*10').

(Surely, '*10' is just an example, I know, that I can increase the INCREMENT
parameter for the sequence.)

I suppose it's a bug.

More details:
http://archives.postgresql.org/pgsql...2/msg00251.php

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2245: pg_dump doesn't dump expressions with sequence in DEFAULT setting for some column in table - 02-07-2006 , 08:38 AM






"Nikolay Samokhvalov" <samokhvalov (AT) gmail (DOT) com> writes:
Quote:
I use some expression as DEFAULT setting for some column of some table. For
example, nextval('myseq') * 10.
Then, I pg_dump my database and restore it. I see 'nextval('myseq')' (w/o
'*10').
You mustn't fool with the default expression for a serial column. You
should have declared this as a plain integer column with a handmade
default expression.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.