Re: Cannot declare record members NOT NULL - Mailing list pgsql-general

From Rodrigo De León
Subject Re: Cannot declare record members NOT NULL
Date
Msg-id a55915760709121250p76b60fb6g7cf08cf9e29e7aeb@mail.gmail.com
Whole thread Raw
In response to Cannot declare record members NOT NULL  (Cultural Sublimation <cultural_sublimation@yahoo.com>)
List pgsql-general
On 9/12/07, Cultural Sublimation <cultural_sublimation@yahoo.com> wrote:
> Thanks for the help!

Not really following you, but try these:

CREATE OR REPLACE FUNCTION GET_MOVIES ()
RETURNS SETOF MOVIES
LANGUAGE SQL STABLE
AS
$$
SELECT MOVIE_ID, MOVIE_NAME FROM MOVIES;
$$;

-- OR --

CREATE OR REPLACE FUNCTION GET_MOVIES (OUT MOVIE_ID INT4, OUT MOVIE_NAME TEXT)
RETURNS SETOF RECORD
LANGUAGE SQL STABLE
AS
$$
SELECT MOVIE_ID, MOVIE_NAME FROM MOVIES;
$$;

pgsql-general by date:

Previous
From: Cultural Sublimation
Date:
Subject: Cannot declare record members NOT NULL
Next
From: "Uwe C. Schroeder"
Date:
Subject: Re: Cannot declare record members NOT NULL