Re: table - sequence dependent informatio

From: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
To: akp geek <akpgeek(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: table - sequence dependent informatio
Date: 2010-08-31 17:32:04
Message-ID: AANLkTinaQJgQ6D=BmjDqOrgYXgyHUP+sU6c+UyPDsA8n@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 31 August 2010 18:02, akp geek <akpgeek(at)gmail(dot)com> wrote:
> Hi all -
>         Is there a way I can tell table - sequence dependent information.
>  which sequences are being used by which table?
> thanks for the help

Take a look at the post "Finding orphaned sequences" on this blog:

http://blog.tapoueh.org/blog.dim.html

Change the last part of the query from "WHERE a.tablename IS NULL" to
"WHERE a.tablename IS NOT NULL". That'll show you what tables your
SERIAL sequences are being used on.

--
Regards,
Peter Geoghegan

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2010-08-31 21:17:04 On-disk size of db increased after restore
Previous Message akp geek 2010-08-31 17:03:04 table - sequence dependent information