Re: Cannot declare record members NOT NULL

From: Rodrigo De León <rdeleonp(at)gmail(dot)com>
To: "Cultural Sublimation" <cultural_sublimation(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cannot declare record members NOT NULL
Date: 2007-09-12 19:50:39
Message-ID: a55915760709121250p76b60fb6g7cf08cf9e29e7aeb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/12/07, Cultural Sublimation <cultural_sublimation(at)yahoo(dot)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;
$$;

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Uwe C. Schroeder 2007-09-12 19:56:10 Re: Cannot declare record members NOT NULL
Previous Message Cultural Sublimation 2007-09-12 19:32:13 Cannot declare record members NOT NULL