Re: Unable to drop sequence due to dependency?

From: Glen Parker <glenebob(at)nwlink(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unable to drop sequence due to dependency?
Date: 2009-03-05 01:18:33
Message-ID: 49AF2869.7020008@nwlink.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> What's the whole contents of the rows with refobjid matching the
> sequence's OID? In particular, classid::regclass would tell you
> where to look for the dependent object.

oms=# select * from pg_depend where objid = 1011680210;
classid | objid | objsubid | refclassid | refobjid | refobjsubid
| deptype
---------+------------+----------+------------+----------+-------------+---------
1259 | 1011680210 | 0 | 2615 | 2200 | 0 | n
(1 row)

oms=# select * from pg_depend where refobjid = 1011680210;
classid | objid | objsubid | refclassid | refobjid |
refobjsubid | deptype
---------+------------+----------+------------+------------+-------------+---------
2604 | 1011687585 | 0 | 1259 | 1011680210 |
0 | n
1247 | 1011680211 | 0 | 1259 | 1011680210 |
0 | i
(2 rows)

> Typically, the default expression for a serial column based on the
> sequence. It's a bit odd that the DROP doesn't tell you about it
> though.

For some reason I got into my head the notion that a sequence could be
dropped even if reference by a field default. This seems pretty silly now.

-Glen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-03-05 01:42:17 Re: Unable to drop sequence due to dependency?
Previous Message Tom Lane 2009-03-05 00:13:49 Re: Unable to drop sequence due to dependency?