SRF question - Mailing list pgsql-general

From Franco Bruno Borghesi
Subject SRF question
Date
Msg-id 1062893257.2438.17.camel@taz.oficina
Whole thread Raw
List pgsql-general
Hi everyone.

I need to create a C function that returns a row, and the type of this row must be the same of a type that I've created using CREATE TYPE.

I've seen the function:
TupleDesc TypeGetTupleDesc(Oid typeoid, List *colaliases)
but I don't understand two things:

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 *?

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

Thanks in advance.




Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Another pimple on the type system
Next
From: expect
Date:
Subject: mysql create table -> psql