
-----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@turnstep.com
PGP Key: 0x14964AC8 200201251014

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

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



Fri, 25 Jan 2002 15:25:49 -0000
"Greg Sabino Mullane" <greg@turnstep.com>
New system OIDS inside include/catalog/pg_proc.h
"Greg Sabino Mullane" <greg@turnstep.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

Fri, 25 Jan 2002 11:04:12 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: New system OIDS inside include/catalog/pg_proc.h 
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@gmx.net


Fri, 25 Jan 2002 11:11:34 -0500 (EST)
Peter Eisentraut <peter_e@gmx.net>
Re: New system OIDS inside include/catalog/pg_proc.h