From: | Alvaro Herrera <alvherre(at)surnet(dot)cl> |
---|---|
To: | Bernd Helmle <mailings(at)oopsware(dot)de> |
Cc: | PostgreSQL-Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Moving sequences to another schema |
Date: | 2005-06-28 01:23:36 |
Message-ID: | 20050628012336.GC15765@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jun 28, 2005 at 01:43:27AM +0200, Bernd Helmle wrote:
> When altering a sequence created by a SERIAL column type (i do this by
> examining pg_depend to avoid moving any other sequences that are
> 'foreign'), i need to recreate the default expression for the SERIAL column
> (stored in pg_attrdef.adbin). Is there an API to do that, or do i have to
> recreate the executable expression tree from scratch? Or am i missing
> something completely...
I think this is done by AddRelationRawConstraints. You'd have to get
the parsetree of the default expression. I think you could get that by
applying raw_parser() to pg_attrdef.adsrc.
--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"The Postgresql hackers have what I call a "NASA space shot" mentality.
Quite refreshing in a world of "weekend drag racer" developers."
(Scott Marlowe)
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2005-06-28 01:37:49 | Re: GiST concurrency commited |
Previous Message | Bruce Momjian | 2005-06-28 01:18:32 | Re: commit_delay, siblings |