Re: SRF question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Franco Bruno Borghesi <franco(at)akyasociados(dot)com(dot)ar>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SRF question
Date: 2003-09-08 15:02:40
Message-ID: 13509.1063033360@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Franco Bruno Borghesi <franco(at)akyasociados(dot)com(dot)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

In response to

  • SRF question at 2003-09-08 14:21:39 from Franco Bruno Borghesi

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Frank van Vugt 2003-09-08 15:20:06 Re: v7.4b2 : How can I use COMMENT ON for Large Objects ?
Previous Message scott.marlowe 2003-09-08 14:53:26 Re: decrypted pwd