SQL to extract column metadata - Mailing list pgsql-novice

From Scott Ford
Subject SQL to extract column metadata
Date
Msg-id F7653F642E0F8E4F9F5D6FD8ED0159ABD989DC@CX43.800onemail.com
Whole thread Raw
In response to Re: SQL state: 42P01  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SQL to extract column metadata  (Tom Lane <tgl@sss.pgh.pa.us>)
WITH ENCRYPTION  (Robert Bernabe <rbernabe@sandmansystems.com>)
List pgsql-novice
Hi Everyone -

I'm looking for a SQL statement that I can use to find out if a given
column in a table uses a specific sequence as it's next default value.
Is this possible?

For example, if the table was created with:

CREATE TABLE accounts
(
  account_id integer NOT NULL DEFAULT
nextval(('accounts_account_id_seq'::text)::regclass),
  account_number character varying(40) NOT NULL
)

Is there a way for me to query the database metadata to verify that
accounts.account_id uses the sequence accounts_account_id_seq as it's
default next value?

Thanks in advance!

Scott.

pgsql-novice by date:

Previous
From: "Obe, Regina"
Date:
Subject: Re: msaccess to postgre
Next
From: Peter Jackson
Date:
Subject: Re: msaccess to postgre