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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2245: pg_dump doesn't dump expressions with sequence in DEFAULT setting for some column in table
Date: 2006-02-07 14:37:49
Message-ID: 6604.1139323069@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com> writes:
> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-02-07 14:49:29 Re: BUG #2242: Inconsistent casting in query with literal vs query with parameter
Previous Message Andreas Erber 2006-02-07 14:02:23 Re: BUG #2240: length() with geometric types