On 12/14/2013 09:00 AM, Tom Lane wrote:
> Tim Uckun <timuckun@gmail.com> writes:
>> BTW is there a way to get a list of dependencies for a object? I was some
>> scripts when I was googling but none of them seem to work with later
>> versions of postgres.
>
> Don't know why that would be; the pg_depend data structure hasn't really
> changed since it was invented (in 7.3, if memory serves). If anything,
> it's gotten easier to work with, as a result of invention of helper
> functions such as pg_describe_object().
>
>
>
> See
> http://www.postgresql.org/docs/9.3/static/catalog-pg-depend.html
> for some documentation about what the deptype means.
So if I am following, in the OPs case when he did the ALTER TABLE RENAME
he transferred ownership of the sequence to the renamed table. Then when
he did CREATE TABLE LIKE (renamed table) he set up a dependency from
the newly created table to the renamed table because the sequence is
actually owned by the renamed table.
>
> regards, tom lane
>
>
--
Adrian Klaver
adrian.klaver@gmail.com