Re: New system OIDS inside include/catalog/pg_proc.h

Lists: pgsql-hackers
From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: New system OIDS inside include/catalog/pg_proc.h
Date: 2002-01-25 15:25:49
Message-ID: E16U8IA-00063N-00@tisch.mail.mindspring.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am in the process of adding some external interfaces to the temporary
relations (started as a goal of being able to view temporary
tables in psql with \d). How do I choose a new OID when adding something
to include/catalog/pg_proc.h? The comments say to "keep the following
ordered by OID" and then "OIDS 1 - 99" but then we jump right into
OIDs 1242,1243,1244,31,1245, etc. What are the guidelines for choosing a
new number when creating (for example) a pg_tempname() function?

Thanks,
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200201251014

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iD8DBQE8UXiwvJuQZxSWSsgRAkmqAJ4zrgtNILaqjcCcGxRWc9ab4q3WfwCg0zjD
+c2X3pa13Z1QF4+keJQFs3U=
=2Nan
-----END PGP SIGNATURE-----


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: New system OIDS inside include/catalog/pg_proc.h
Date: 2002-01-25 16:04:12
Message-ID: 25716.1011974652@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Greg Sabino Mullane" <greg(at)turnstep(dot)com> writes:
> I am in the process of adding some external interfaces to the temporary
> relations (started as a goal of being able to view temporary
> tables in psql with \d).

I think you're wasting your time to think about this now. By the time
7.3 comes out, we will have an entirely new approach to temp tables:
they'll be named with the same names the user sees, and live in
per-backend temp schemas to avoid name conflicts with permanent tables.
So any code based on working with the existing temp-name mapper will
be in the scrap heap before it can get released :-(

> How do I choose a new OID when adding something
> to include/catalog/pg_proc.h?

See unused_oids.

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New system OIDS inside include/catalog/pg_proc.h
Date: 2002-01-25 16:11:34
Message-ID: Pine.LNX.4.30.0201251108150.690-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Greg Sabino Mullane writes:

> What are the guidelines for choosing a
> new number when creating (for example) a pg_tempname() function?

Just pick the first one that's available.

~/pgsql/src/include/catalog$ ./unused_oids
3 - 11
90
99
109 - 111
143
652
1076 - 1077
2019
2071 - 9999

Maybe the single-digits should stay reserved for some truly important
objects or magic use, but for any old functionI'd start at 90, or if you
make a group of three functions use 109-111, or if you make a group of 25
objects, start at 2071. In short, it doesn't matter, but try to make a
little sense.

--
Peter Eisentraut peter_e(at)gmx(dot)net