Re: invisible dependencies on a table?

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tim Uckun <timuckun(at)gmail(dot)com>
Cc: David Johnston <polobo(at)yahoo(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: invisible dependencies on a table?
Date: 2013-12-14 18:36:57
Message-ID: 52ACA549.2020605@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/14/2013 09:00 AM, Tom Lane wrote:
> Tim Uckun <timuckun(at)gmail(dot)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(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-12-14 18:50:58 Re: invisible dependencies on a table?
Previous Message Tom Lane 2013-12-14 17:00:54 Re: invisible dependencies on a table?