Re: ALTER SEQUENCE: Missing feature?

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:34:52
Message-ID: 401D70FC.50203@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>"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.
>>
>>
>
>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?
>
>
>
No because PostgreSQL uses SELECT for many things, including the
execution of functions.

>(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?
>
No because from a logical (at least mine) perspective, Indices are a
table only thing. Sequences
are not always used in correlation with a table.

> See also GRANT/REVOKE; will
>you change that syntax too?
>

I am not sure how this is even relevant as GRANT / REVOKE can be applied
to a specific object?

> 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.
>
>
That may be the case but couldn't you just have a generic function
within C that just calls out the
appropriate parameters per the relation? E.g; it knows that ALTER
SEQUENCE is actually
ALTER TABLE minus these six (whatever six they may be) parameters?

Sincerely,

Joshua D. Drake

> regards, tom lane
>
>

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd(at)commandprompt(dot)com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-02-01 21:58:42 Re: Idea about better configuration options for sort memory
Previous Message Tom Lane 2004-02-01 21:24:18 Re: ALTER SEQUENCE: Missing feature?