pg.ddx.io pgsql-interfaces@postgresql.org mailing list archivehelp / color / mirror / Atom feed
client interface docs 2+ messages / 2 participants [nested] [flat]
* client interface docs @ 2002-12-06 05:06 Reggie Burnett <rykr@bellsouth.net> 2002-12-06 08:42 ` Re: client interface docs Andreas Kretzer <andi@kretzer-berlin.de> 0 siblings, 1 reply; 2+ messages in thread From: Reggie Burnett @ 2002-12-06 05:06 UTC (permalink / raw) To: pgsql-interfaces I'm working on a new interface to PostgreSQL and having a difficult time. Perhaps someone here can shed some light on the subject. 1. Am I correct in thinking that the OID that I receive with the RowDescription is the column type? I have several of those defined from the 7.3 source code. Have those changed in the past and are they likely to change in the future? I have heard people talking about querying the server for type names or type oid values but I can't believe it is that difficult. 2. How do I receive the column modifers such as not null, primary key, indexed, etc. I know RowDescription sends down type modifiers but on an int4 column that field is always -1. I use another client app to change the column from allowing nulls to not allowing nulls (same value in column). The client app as well as psql on Linux sees the change but my interface still receives just -1 for the type modifier. What am I missing? If there is someplace that has the oids documented or the low-level constants documented, I would love to see that. Thanks Reggie ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: client interface docs 2002-12-06 05:06 client interface docs Reggie Burnett <rykr@bellsouth.net> @ 2002-12-06 08:42 ` Andreas Kretzer <andi@kretzer-berlin.de> 0 siblings, 0 replies; 2+ messages in thread From: Andreas Kretzer @ 2002-12-06 08:42 UTC (permalink / raw) To: pgsql-interfaces On 05.12.2002 at 23:06 Reggie Burnett wrote: >I'm working on a new interface to PostgreSQL and having a difficult >time. >Perhaps someone here can shed some light on the subject. > >1. Am I correct in thinking that the OID that I receive with the >RowDescription is the column type? I have several of those defined from I am not an expert in this ... but ususally the OID is just the internal 'key' for a record (OID = Object IDentyfier). For RowDescription it _may_ be always the same for predefined types but you should not rely on them! >the >7.3 source code. Have those changed in the past and are they likely to >change in the future? I have heard people talking about querying the >server >for type names or type oid values but I can't believe it is that >difficult. That shouldn't be too hard. The thing about the OID is, that it is garanteed to stay the same as long as you are working with the same DB. So once checked you further only need the OID to cleanly recognize the rowtype. 'Once' here means once per session. Over a network you can't see if someone changed the DB "over night" :-) > >2. How do I receive the column modifers such as not null, primary key, >indexed, etc. I know RowDescription sends down type modifiers but on an >int4 column that field is always -1. I use another client app to change >the >column from allowing nulls to not allowing nulls (same value in column). >The client app as well as psql on Linux sees the change but my interface >still receives just -1 for the type modifier. What am I missing? > >If there is someplace that has the oids documented or the low-level >constants documented, I would love to see that. Andreas ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-12-06 08:42 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2002-12-06 05:06 client interface docs Reggie Burnett <rykr@bellsouth.net> 2002-12-06 08:42 ` Andreas Kretzer <andi@kretzer-berlin.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox