I know that this is an old question but I have some more that i am wondering
On Thursday 18 November 2004 17:19, Michael Fuhr wrote:
> > If i try to let the function use a type that is only created in postgres
> > (not c code) then it works.
> I assume you mean it works for a composite type like this:
> CREATE TYPE foo AS (val INTEGER, fstring TEXT);
yes thats correct. This works fine while i am following the documentation.
> As the CREATE TYPE documentation says, this is essentially the same
> as the row type of a table. But your type is a scalar, not a composite,
> so RelationNameGetTupleDesc() doesn't work.
> > Is it possible to use my own type to be returned?
> Yes, and you've already written a function that does: alignres_in().
> Its CREATE FUNCTION statement says "RETURNS alignres", doesn't it?
> If you want the new function to return a single value of your type,
> then do what alignres_in() does.
this i have done, i can return a single value of my own type from the
function. So now i am wondering, is it possible to return a set of my type?
If it is possible, how do i do that?
thanks for all the help so far!
In response to
pgsql-novice by date
|Next:||From: sarlav kumar||Date: 2004-12-15 14:38:22|
|Subject: \d output to a file|
|Previous:||From: Geoffrey||Date: 2004-12-15 12:39:54|
|Subject: Re: postgresql compile errors|