From: | Nicolas Aragon <nyco(at)jet(dot)es> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | types oids |
Date: | 1999-08-16 23:18:35 |
Message-ID: | 19990817011835.A165@atlante |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Hello,
I'm programming with pqlib from Pascal (FPC) and trying to build some
classes to encapsulate result sets in a similar way as Delphi.
I need to know the type of every field and I've found that PQftype returns
an OID. OK, I can query pg_type system table and find out type information.
But this leads me to new questions because it seems that standard types
aren't hardcoded anywhere. pg_type tells me the name, size and some other
information about the type. But what about the "kind" of the type (numeric,
text, date...)?
I can only think of comparing the name with a list of names for standard
types. Is there another simpler method? A standard relation between standard
types and their OIDs?
If the answer to last question is "no", can I really trust at least the name?
If so, since I don't want to make the metadata query before each "regular"
query, I'll have to cache it. Is it OK to do it once per connection?
I can even think that.... is the user (admin) allowed to change the names
of standard types?
Another, more trivial question: do you know where to find nice logos
for postgres?
Thanks in advance
Nico
From | Date | Subject | |
---|---|---|---|
Next Message | magnusm | 1999-08-16 23:23:09 | Error using Perl 5 interface |
Previous Message | Mark Dzmura | 1999-08-16 20:49:09 | a few additional JDBC points?? |