It works fine. But is there way not to point 'as c(qq int4, qq1 int4)'?


If you mean, is there a way to leave out the 'as c(qq int4, qq1 int4)', the answer is no. You need to either declare the function to return a determinate data type, or you have to specify the data type at runtime in the query string.

it's a great pity :(.


But in function I already make TupleDesc:
tupdesc = CreateTemplateTupleDesc(attnum, false);
for (i = 0; i < attnum; i++) {
sprintf(attname, "z%d", i+1);
TupleDescInitEntry(tupdesc, i+1, attname, INT4OID, -1, 0, false);
}
As I understand, this code makes full description of returning value, including types and column's names.
Is this info used anywhere?



-- Teodor Sigaev E-mail: [EMAIL PROTECTED]


---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster

Reply via email to