Re: PostgreSQL Functions / PL-Language

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Jan Cruz <malebug(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL Functions / PL-Language
Date: 2006-02-18 08:31:54
Message-ID: 20060218083154.GB20716@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Feb 18, 2006 at 04:10:13PM +0800, Jan Cruz wrote:
> Correct me if I am wrong but SQL procedural language doesn't have support
> for variable declarations?

Correct, you'll need pl/pgsql for that.

> Why does my stored function returns only the first row of the query instead
> of the whole set of query?

Did you declare your function to return "setof <whatever>" ?

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Cruz 2006-02-18 08:48:55 Re: PostgreSQL Functions / PL-Language
Previous Message Martijn van Oosterhout 2006-02-18 08:30:53 Re: Updating a sequential range of unique values?