From: | Terry Lee Tucker <terry(at)esc1(dot)com> |
---|---|
To: | "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: OID Usage |
Date: | 2005-01-14 23:34:38 |
Message-ID: | 200501141834.38188.terry@esc1.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
It's not very hard to do. I just got rid them. It took me about a day. Our
application is an X-Windows front end written is C. I wrote a function to
return the next value of the serial key for any table. Here is the select
statement buitl with sprintf:
"SELECT relname FROM pg_class WHERE relkind = \'S\' AND
relname = \'%s_recid_seq\':
All our sequences are called "recid" and since the naming convention is
<table_name>_recid_seq, it's easy to get the name of the right sequence. You
might as well go ahead and do it. You'll feel better after you do ;o)
On Friday 14 January 2005 06:13 pm, Bo Lorentsen saith:
> Alvaro Herrera wrote:
> >Yeah, though things get hairy that way because you have to peek at
> >pg_attribute to match the objsubid in pg_depend; and self-join pg_class
> >to get to the index itself. Not sure if it all can be done in a single
> >query.
>
> Sounds like my task, to make an oid free insert/select, is going to be
> very interesting :-)
>
> /BL
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
--
Work: 1-336-372-6812
Cell: 1-336-363-4719
email: terry(at)esc1(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2005-01-14 23:37:49 | Re: [HACKERS] Much Ado About COUNT(*) |
Previous Message | Alvaro Herrera | 2005-01-14 23:24:38 | Re: OID Usage |