|
Home > Archive > PostgreSQL Bugs > November 2005 > BUG #2073: Can't drop sequence when created via SERIAL column
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
BUG #2073: Can't drop sequence when created via SERIAL column
|
|
| Aaron Dummer 2005-11-29, 11:24 am |
|
The following bug has been logged online:
Bug reference: 2073
Logged by: Aaron Dummer
Email address: aaron@dummer.info
PostgreSQL version: 8.0.3
Operating system: Debian Linux
Description: Can't drop sequence when created via SERIAL column
Details:
If I create a table named foo with a column named bar, column type SERIAL,
it auto-generates a sequence named foo_bar_seq. Now if I manually create a
new sequence called custom_seq, and change the default value of foo.bar to
reference the new sequence, I still can't delete the old sequence
(foo_bar_seq).
In other words, from a user's point of view, the foo table is no longer
dependent on the foo_bar_seq, yet the system still sees it as dependent.
I brought this topic up on the #postgresql IRC channel and the behavior was
confirmed by AndrewSN, scampbell_, and mastermind.
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Bruce Momjian 2005-11-29, 11:24 am |
| Aaron Dummer wrote:
>
> The following bug has been logged online:
>
> Bug reference: 2073
> Logged by: Aaron Dummer
> Email address: aaron@dummer.info
> PostgreSQL version: 8.0.3
> Operating system: Debian Linux
> Description: Can't drop sequence when created via SERIAL column
> Details:
>
> If I create a table named foo with a column named bar, column type SERIAL,
> it auto-generates a sequence named foo_bar_seq. Now if I manually create a
> new sequence called custom_seq, and change the default value of foo.bar to
> reference the new sequence, I still can't delete the old sequence
> (foo_bar_seq).
>
> In other words, from a user's point of view, the foo table is no longer
> dependent on the foo_bar_seq, yet the system still sees it as dependent.
>
> I brought this topic up on the #postgresql IRC channel and the behavior was
> confirmed by AndrewSN, scampbell_, and mastermind.
Right. We have this TODO item:
* %Disallow changing default expression of a SERIAL column?
which would prevent you from changing the default expression for a
SERIAL column. So the answer is, don't do that, and in the future, we
might prevent it.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
|
|
|
|
|