Re: sequences TODO items

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: systemguards(at)gmail(dot)com
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sequences TODO items
Date: 2005-09-02 20:57:52
Message-ID: 200509022057.j82KvqL12425@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jaime Casanova wrote:
> Hi,
>
> i'm looking for some item i can do and that have enough consensus to
> make it worth the effort... :)
>
> * Have sequence dependency track use of DEFAULT sequences, seqname.nextval?
>
> what this means? i don't understand it...

The idea is to automatically add a dependency of the sequence on the
table using it as a default.

> * %Disallow changing default expression of a SERIAL column?
>
> why? a SERIAL is not really a datatype but a short-hand to make an
> integer with a nextval's sequence as default... so why making them
> both (the integer type and the nextval's sequence as default) act as
> if it were a single unit?
> Actually, i have dropped sequences created with SERIAL because i found
> that was better to me to make it manually...

Well, SERIAL adds dependency information, so if you drop the table, the
sequence is dropped. If you change the default for a serial type, the
dependency on the sequence should go away.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-09-02 21:08:54 Re: Remove xmin and cmin from frozen tuples
Previous Message Alvaro Herrera 2005-09-02 20:53:11 Re: Remove xmin and cmin from frozen tuples