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

Re: pg_dump bug in 7.3.9 with sequences

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump bug in 7.3.9 with sequences
Date: 2005-02-02 21:21:48
Message-ID: 6686.1107379308@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> However if you do the following:

> create table foo (foo serial not null, bar text);
> create sequence foo_seq;
> alter table foo alter column foo set default nextval('foo_seq');

This is flat out pilot error: you do not get to mess with the default
expression of a SERIAL column, because it's part of the internal
implementation of the SERIAL pseudo-type.  If I were going to do
anything about it, I'd patch ALTER TABLE to refuse the above command.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Merlin MoncureDate: 2005-02-02 21:30:52
Subject: Re: [NOVICE] Last ID Problem
Previous:From: G u i d o B a r o s i oDate: 2005-02-02 21:18:40
Subject: fatal: cache id 30 (or alike)

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