On Sun, Jul 09, 2006 at 09:52:35AM +0200, Luca Giandoso wrote:
> I wold like to make a plpgsql function that return column names and
> their data types of a specific table.
Do you have a reason for returning a cursor instead of SETOF some
type? In versions prior to 8.1 you could create a custom t
I wold like to make a plpgsql function that return column names and
their data types of a specific table.
I have done this using:
CREATE OR REPLACE FUNCTION _get_table_definition(refcursor) RETURNS
refcursor SECURITY DEFINER AS
$$
DECLARE
BEGIN
OPEN $1 FOR SELECT column_name as field_name, dat