Re: Unable to drop sequence due to dependency? - Mailing list pgsql-general

From Glen Parker
Subject Re: Unable to drop sequence due to dependency?
Date
Msg-id 49AF2869.7020008@nwlink.com
Whole thread Raw
In response to Re: Unable to drop sequence due to dependency?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Unable to drop sequence due to dependency?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unable to drop sequence due to dependency?
Next
From: Tom Lane
Date:
Subject: Re: Unable to drop sequence due to dependency?