Re: Object IDs in Parse message

Dave Cramer <[email protected]> Tue, 3 Sep 2019 16:02:24 -0400
Newsgroups gmane.comp.db.postgresql.interfaces
Message-ID <CADK3HH+NhuwtaK2sUN9emM4Q+yCETYYX-ANw5v5KXhU3SYrWpw@mail.gmail.com>
--000000000000d9d3310591ab9115
Content-Type: text/plain; charset="UTF-8"

select oid, * from pg_type

Dave Cramer

[email protected]
www.postgresintl.com


On Tue, 3 Sep 2019 at 16:01, Malcolm Matalka <[email protected]> wrote:

> 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?  Doing some internet
> searches didn't bring up much.  Poking around the code I came across the
> file:
>
> ./src/backend/catalog/pg_type_d.h
>
> And that has a series of OID's with integer values.  Is this the mapping
> I'm looking for?
>
> If so, It's not clear how to express some things.  For example there is
> a MONEYARRAYOID, but no MONEYOID.  Would I use, for example, NUMERICOID
> for money?  If so, why does MONEYARRAYOID exist rather than using
> NUMERICOID?
>
> Thanks,
> /Malcolm
>

--000000000000d9d3310591ab9115
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">select oid, * from pg_type<div><br clear=3D"all"><div><div=
 dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><=
div dir=3D"ltr"><div>Dave Cramer<br><br><a href=3D"mailto:davec@postgresint=
l.com" target=3D"_blank">[email protected]</a></div><div><a href=3D"ht=
tp://www.postgresintl.com" target=3D"_blank">www.postgresintl.com</a></div>=
</div></div></div><br></div></div><br><div class=3D"gmail_quote"><div dir=
=3D"ltr" class=3D"gmail_attr">On Tue, 3 Sep 2019 at 16:01, Malcolm Matalka =
&lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:=
<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello, I&#39;m =
implementing my own pgsql client for fun and I&#39;m trying to<br>
understand how to send a Parse message.=C2=A0 The final parameter to Parse =
is<br>
a series of Int32s with the description:<br>
<br>
Specifies the object ID of the parameter data type. Placing a zero here<br>
is equivalent to leaving the type unspecified.<br>
<br>
But where do I find the list of object IDs?=C2=A0 Doing some internet<br>
searches didn&#39;t bring up much.=C2=A0 Poking around the code I came acro=
ss the<br>
file:<br>
<br>
./src/backend/catalog/pg_type_d.h<br>
<br>
And that has a series of OID&#39;s with integer values.=C2=A0 Is this the m=
apping<br>
I&#39;m looking for?<br>
<br>
If so, It&#39;s not clear how to express some things.=C2=A0 For example the=
re is<br>
a MONEYARRAYOID, but no MONEYOID.=C2=A0 Would I use, for example, NUMERICOI=
D<br>
for money?=C2=A0 If so, why does MONEYARRAYOID exist rather than using<br>
NUMERICOID?<br>
<br>
Thanks,<br>
/Malcolm<br>
</blockquote></div>

--000000000000d9d3310591ab9115--