Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group