public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dave Cramer <[email protected]>
To: Malcolm Matalka <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: Object IDs in Parse message
Date: Wed, 4 Sep 2019 05:49:21 -0400
Message-ID: <CADK3HHK0A-YFY=3cdtu7VCNc6HVTD69cLE6iw+L4LbPGGmeVog@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
On Wed, 4 Sep 2019 at 03:45, Malcolm Matalka <[email protected]> wrote:
>
> Tom Lane <[email protected]> writes:
>
> > Malcolm Matalka <[email protected]> writes:
> >> Hello, I'm implementing my own pgsql client for fun and I'm trying to
> >> understand how to send a Parse message. The final parameter to Parse is
> >> a series of Int32s with the description:
> >> Specifies the object ID of the parameter data type. Placing a zero here
> >> is equivalent to leaving the type unspecified.
> >
> >> But where do I find the list of object IDs?
> >
> > SELECT oid, typname FROM pg_type;
> >
> >> If so, It's not clear how to express some things. For example there is
> >> a MONEYARRAYOID, but no MONEYOID.
> >
> > For historical reasons, the macro for money's OID is CASHOID.
> > There's no grandfathered symbol for money[], though, so that
> > gets a name constructed per standard rules (cf form_pg_type_symbol
> > in genbki.pl).
> >
> > However, I fail to see why a generic client would need to know that.
> > If you're hard-wiring OIDs into your code for anything beyond very
> > basic types like int4, you're probably doing it wrong. Remember
>
> Ok, it wasn't clear to me if and when I should pass this data in. I
> couldn't find any documentation for this translating to performance
> improvement, or addressing any possible errors due to ambiguity in
> types. In general, should an interface no pass that information in on a
> Parse? Is there a reason to do it?
>
Yes, if you ever decide to use binary mode for the parameters and the
results then you need to know the type
The jdbc driver and the .net driver both do this.
Dave
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Object IDs in Parse message
In-Reply-To: <CADK3HHK0A-YFY=3cdtu7VCNc6HVTD69cLE6iw+L4LbPGGmeVog@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox