Michael Meskes <meskes@postgresql.org> writes:
> Can I safely assume that the OID of the standard data types remain the same
> for future releases? And of course that they are the same for every
> installation?

They are fixed in any one version, and really are not very likely to
change across versions either.  But I suppose it could happen.

> I've been send a patch to speed up ecpg significantly by not looking up
> datatypes everytime. As it is written right now it works by har coding some
> types. I wonder if this will create problems.

Exactly how "hard coded" do you mean?  If you #include "catalog/pg_types.h"
and use the OID #defines therein, you're not doing any worse than a lot
of places in the backend.  At worst you'd create a cross-major-version
incompatibility for ecpg.

			regards, tom lane

Fri, 15 Sep 2000 10:23:01 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: type OIDs 
Can I safely assume that the OID of the standard data types remain the same
for future releases? And of course that they are the same for every
installation?

I've been send a patch to speed up ecpg significantly by not looking up
datatypes everytime. As it is written right now it works by har coding some
types. I wonder if this will create problems.

Michael
-- 
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!

Fri, 15 Sep 2000 12:57:20 -0700
Michael Meskes <meskes@postgresql.org>
type OIDs
On Fri, Sep 15, 2000 at 10:23:01AM -0400, Tom Lane wrote:
> They are fixed in any one version, and really are not very likely to
> change across versions either.  But I suppose it could happen.

That's good enough for my usage I think.

> Exactly how "hard coded" do you mean?  If you #include "catalog/pg_types.h"
> and use the OID #defines therein, you're not doing any worse than a lot
> of places in the backend.  At worst you'd create a cross-major-version
> incompatibility for ecpg.

Sounds good. I will do that.

Michael
-- 
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!

Sun, 17 Sep 2000 18:59:57 -0700
Michael Meskes <meskes@postgresql.org>
Re: type OIDs