Not that I can see. You still have to get the sequence object from
someplace, and having it be a distinct datatype is zero help for finding
a column-specific sequence.
What about allowing sequence qualifiers in the SERIAL definition?
Chris
---(end of broadcast)-
"Joshua D. Drake" <[EMAIL PROTECTED]> writes:
> Wouldn't a lot of this be solved (I know I am over simplyfing) by making
> serial a real type?
Not that I can see. You still have to get the sequence object from
someplace, and having it be a distinct datatype is zero help for finding
a column-speci
Tom Lane wrote:
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes:
pg_dump will just emit "create table t1 (f1 serial)" with no hint that
the sequence ought to be set to CYCLE mode. I'm not sure about an
appropriate fix offhand --- we can't very well use ALTER SEQUENCE in
just this way in the dum
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes:
>> pg_dump will just emit "create table t1 (f1 serial)" with no hint that
>> the sequence ought to be set to CYCLE mode. I'm not sure about an
>> appropriate fix offhand --- we can't very well use ALTER SEQUENCE in
>> just this way in the dump, b
On Wed, 2 Feb 2005 19:04:04 -0300, Alvaro Herrera
<[EMAIL PROTECTED]> wrote:
> > It is not pilot error if PostgreSQL allows it. There is
> > nothing "illegal" about the above commands in their execution.
> > The pg_dump application should recognize that the object has
> > changed and react accordin
pg_dump will just emit "create table t1 (f1 serial)" with no hint that
the sequence ought to be set to CYCLE mode. I'm not sure about an
appropriate fix offhand --- we can't very well use ALTER SEQUENCE in
just this way in the dump, because of the risk of the sequence name
being possibly different
3. When the default is changed, the dependency is updated
to reflect the new sequence. The old sequence is left intact
as an independent object.
What exactly is the use-case of that (or any other manipulation of a
serial column's default)? There is no point that I can see in just
rolling one
"Joshua D. Drake" <[EMAIL PROTECTED]> writes:
> Alvaro Herrera wrote:
>> ISTM this is a bug, but it's not clear to me what is the solution.
>> I can think of two:
>>
>> 1. Changing the default is forbidden
>> 2. When the default is changed, the dependency on the sequence is
>> dropped, and the seq
On Wed, Feb 02, 2005 at 03:49:59PM -0800, Joshua D. Drake wrote:
> Alvaro Herrera wrote:
>
> >On Wed, Feb 02, 2005 at 01:54:48PM -0800, Joshua D. Drake wrote:
> >
> >>It is not pilot error if PostgreSQL allows it. There is
> >>nothing "illegal" about the above commands in their execution.
> >>The
Alvaro Herrera wrote:
On Wed, Feb 02, 2005 at 01:54:48PM -0800, Joshua D. Drake wrote:
It is not pilot error if PostgreSQL allows it. There is
nothing "illegal" about the above commands in their execution.
The pg_dump application should recognize that the object has
changed and react accordingly
On Wed, Feb 02, 2005 at 01:54:48PM -0800, Joshua D. Drake wrote:
> It is not pilot error if PostgreSQL allows it. There is
> nothing "illegal" about the above commands in their execution.
> The pg_dump application should recognize that the object has
> changed and react accordingly.
ISTM this is
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
"Joshua D. Drake" <[EMAIL PROTECTED]> 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
Hello,
Ran into this little gem with a customer today:
This works:
create table foo (foo int not null, bar text);
create sequence foo_seq;
alter table foo alter column foo set default nextval('foo_seq');
pg_dump will correctly dump the table:
CREATE TABLE foo (
foo integer DEFAULT nextval('foo_s
14 matches
Mail list logo