Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5Gm9-00047v-VH for pgsql-interfaces@arkaria.postgresql.org; Tue, 03 Sep 2019 21:55:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i5Gm8-0008SX-Id for pgsql-interfaces@arkaria.postgresql.org; Tue, 03 Sep 2019 21:55:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5Gm8-0008PW-A1 for pgsql-interfaces@lists.postgresql.org; Tue, 03 Sep 2019 21:55:44 +0000 Received: from mail-pl1-f182.google.com ([209.85.214.182]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5Gm5-0002it-Fg for pgsql-interfaces@lists.postgresql.org; Tue, 03 Sep 2019 21:55:43 +0000 Received: by mail-pl1-f182.google.com with SMTP id y10so2626482pll.7 for ; Tue, 03 Sep 2019 14:55:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OC5GTr1ACQW30O8XTYas6dG3HxXN4RTThoHlu2rm8/0=; b=NVumpIerQK7RO+tJfYnroSJLl54amVgmB5wFETKqwRCRagoIj2sMm3n6TD0VELLZ/o nBqVVRW3k9gZoySRGGNNk8XUEoR3IYTvgNepyey+iCLqFKgARE4IVF+395XM7xCS5T2W nJTySUEMwClpVVDfAyxGVbplB2UnIcysKUqiWX+jH/MxrFXfl8lDsdzimOznTNKKmrpQ +3shQdvpXAreGE8KbTlL902qbtAp26ovxGxEo/92MqakLg5DeIPVSJT4E7RTROhFVnoB fGIgL3DXrUIOYBrMvqXZ9tCOQQ6RkRlMiiBlx9TbKcH+g5lxZSo+3ZnuGaFi4V/DIaHE WcoQ== X-Gm-Message-State: APjAAAVmedP80VsGs6uJSeuigpiUaKmQ8X17PfV2qE+sGCVOYNhtKpqd mCAlzmqSZI21P/pDiozdX0cXfPFukWobb8rZEgeSPuB+ X-Google-Smtp-Source: APXvYqycm3G/Y+NDqo70K7Yt1nAB3gZd0c0qesIWMYJ0ScHhvI1qeVGkI8681JYOrz8WCBe8ZB0QVlCOZqETSSqzC6E= X-Received: by 2002:a17:902:aa08:: with SMTP id be8mr2170271plb.82.1567540955958; Tue, 03 Sep 2019 13:02:35 -0700 (PDT) MIME-Version: 1.0 References: <86o9019mjr.fsf@gmail.com> In-Reply-To: <86o9019mjr.fsf@gmail.com> From: Dave Cramer Date: Tue, 3 Sep 2019 16:02:24 -0400 Message-ID: Subject: Re: Object IDs in Parse message To: Malcolm Matalka Cc: pgsql-interfaces@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000d9d3310591ab9115" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000d9d3310591ab9115 Content-Type: text/plain; charset="UTF-8" select oid, * from pg_type Dave Cramer davec@postgresintl.com www.postgresintl.com On Tue, 3 Sep 2019 at 16:01, Malcolm Matalka 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
select oid, * from pg_type

<= div dir=3D"ltr">=


On Tue, 3 Sep 2019 at 16:01, Malcolm Matalka = <mmatalka@gmail.com> wrote:=
Hello, I'm = implementing my own pgsql client for fun and I'm trying to
understand how to send a Parse message.=C2=A0 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?=C2=A0 Doing some internet
searches didn't bring up much.=C2=A0 Poking around the code I came acro= ss the
file:

./src/backend/catalog/pg_type_d.h

And that has a series of OID's with integer values.=C2=A0 Is this the m= apping
I'm looking for?

If so, It's not clear how to express some things.=C2=A0 For example the= re is
a MONEYARRAYOID, but no MONEYOID.=C2=A0 Would I use, for example, NUMERICOI= D
for money?=C2=A0 If so, why does MONEYARRAYOID exist rather than using
NUMERICOID?

Thanks,
/Malcolm
--000000000000d9d3310591ab9115--