Re: ALTER SEQUENCE: Missing feature?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ALTER SEQUENCE: Missing feature?
Date: 2004-02-01 21:24:18
Message-ID: 2197.1075670658@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
>> I guess it comes down to a philosophical thing. Should people need to
>> know the PostgreSQL internals like the fact that a SEQUENCE is
>> currently implemented as a TABLE, or should they just be able to do
>> reasonable things like call ALTER SEQUENCE when they alter a sequence?
>>
> I would have to second this.

Well, (1) we are not going to be able to hide the implementation fact
entirely --- for instance, you can't readily hide that they share the
same namespace, so that you can't have a table and a sequence of the
same name. People will have to learn this fact about sequences
eventually. For that matter we advertise it by using "SELECT * FROM
sequence" as a way of inspecting sequence parameters; will you invent
a replacement for that?

(2) If you do want to hide it at the cosmetic level you will have more
work to do than this. ALTER TABLE also works (in some variants) on
indexes; will you also invent ALTER INDEX? See also GRANT/REVOKE; will
you change that syntax too? Will you invent new privilege names for
sequences to hide the overlap with table privilege types? Will you
forbid the old spellings of all this stuff (thereby breaking existing
pg_dump files)?

It just seems like a much bigger can of worms to open than the payback
would justify.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2004-02-01 21:34:52 Re: ALTER SEQUENCE: Missing feature?
Previous Message Joshua D. Drake 2004-02-01 20:26:08 Re: ALTER SEQUENCE: Missing feature?