Re: libpq, PQExecParams and the inserting of binary data - Mailing list pgsql-interfaces

From Daniel Verite
Subject Re: libpq, PQExecParams and the inserting of binary data
Date
Msg-id 20050603211559.5392884@localhost
Whole thread Raw
In response to Re: libpq, PQExecParams and the inserting of binary data  (David Hinkle <drachs@gmail.com>)
List pgsql-interfaces
    David Hinkle wrote:

> I will try this.  Out of curiosity, where does the value of 17 for the
> OID field come from?

From the pg_type table:

template1=# select oid from pg_type where typname='bytea';oid 
----- 17
(1 row)

Alternatively, there's the server/catalog/pg_type.h include file
which has #defines for built-in datatypes:

$ grep BYTEA server/catalog/pg_type.h
#define BYTEAOID                17

-- DanielPostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org


pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: libpq, PQExecParams and the inserting of binary data
Next
From: "Daniel Verite"
Date:
Subject: Re: libpq, PQExecParams and the inserting of binary data