Getting the type Oid in a CREATE TYPE output function .. - Mailing list pgsql-hackers

From Weslee Bilodeau
Subject Getting the type Oid in a CREATE TYPE output function ..
Date
Msg-id 452E6779.6010508@hypermediasystems.com
Whole thread Raw
Responses Re: Getting the type Oid in a CREATE TYPE output function ..  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I'm trying to create a few new types, and based on the type in/out
functions will operate a bit differently.

For the input function finding the type Oid is easy -
 Oid our_type_oid = PG_GETARG_OID(1);

For output though I'm having difficulty finding out the type Oid.

I've tried using getBaseType, get_rel_type_id, and get_typ_typrelid.

Maybe I'm using the options wrong?
Or not looking in the right place?

I'm only interested in getting it working on 8.1 or greater, so if it
changes in older versions I'm not as concerned.

Any help is appreciated.


Weslee



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PERFORM] Hints proposal
Next
From: Tom Lane
Date:
Subject: SQL functions, INSERT/UPDATE/DELETE RETURNING, and triggers