Re: SRF question
| От | Tom Lane |
|---|---|
| Тема | Re: SRF question |
| Дата | |
| Msg-id | 13509.1063033360@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | SRF question (Franco Bruno Borghesi <franco@akyasociados.com.ar>) |
| Ответы |
Re: SRF question
|
| Список | pgsql-general |
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
В списке pgsql-general по дате отправления: