Re: SRF question - Mailing list pgsql-general

From Franco Bruno Borghesi
Subject Re: SRF question
Date
Msg-id 1063043331.6897.7.camel@taz.oficina
Whole thread Raw
In response to Re: SRF question  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SRF question
List pgsql-general
yes, parseTypeString() seems to be the way.

I've found parseTypeString() in plpgsql.so... would it be ok to call dlopen('plpgsql.so', ...) from my C code to access this function or is there some other method I sould use?

thanks tom.

On Mon, 2003-09-08 at 12:02, Tom Lane wrote:
Franco Bruno Borghesi <franco@akyasociados.com.ar> writes:
> 1)I just know the name of the type, not its oid... woud it be ok if I
> execute a SELECT on pg_type asking for typname to find the oid of the
> type I want to return? or is there any function like
> RelationNameGetTupleDesc (maybe TypeNameGetTupleDesc) that I can call
> passing just the typename as a char *?

A SELECT seems like the hard way.  Look into parse_type.c for some
routines that might help.  Offhand parseTypeString() is probably your
best bet.

> 2)in case TypeGetTupleDesc is the only option, what is the second
> argument?

I believe you can just set it to NIL, since you are only interested in
composite types.
		regards, tom lane
Attachment

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: decrypted pwd
Next
From: Tom Lane
Date:
Subject: Re: SRF question