Definition of return types for own functions? - Mailing list pgsql-general

From Matthias.Pitzl@izb.de
Subject Definition of return types for own functions?
Date
Msg-id 11EC9A592C31034C88965C87AF18C2A70CFC71@m0000s61
Whole thread Raw
Responses Re: Definition of return types for own functions?  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: Definition of return types for own functions?  (Lexington Luthor <Lexington.Luthor@gmail.com>)
List pgsql-general
Hello all!

Is it possible to define a complex return type like a record in a function
without having some table around with the needed structure of the return
values?
For example: if i want a function that returns a date and an integer, i
create the function:

CREATE FUNCTION bla(text) RETURNS SETOF table_name AS '...

And i need the table table_name with the structure:
CREATE TABLE table_name( datum DATE, zahl INTEGER);

Can i somehow define this structe inside the function declaration without
having some empty tables or views around?

Thank you all!

Best regards,
Matthias

pgsql-general by date:

Previous
From: Michael Vodep
Date:
Subject: Full Text fuzzy search
Next
From: Teodor Sigaev
Date:
Subject: Re: cyclical redundancy checksum algorithm(s)?