Re: Simple function - Mailing list pgsql-general

From Christine Penner
Subject Re: Simple function
Date
Msg-id 19740413173256.45D1B1E12F8D1DB8@edtnaa02.telusplanet.net
Whole thread Raw
In response to Simple function  (Christine Penner <christine@ingenioussoftware.com>)
List pgsql-general
Thanks a lot, that worked great. Saved me a lot of time trying to
figure it out too.

Christine

>It works for me:
>
>postgres=# CREATE OR REPLACE FUNCTION countertest(integer) RETURNS
>bigint AS $$ SELECT COUNT(*) FROM test WHERE nbr = $1; $$ LANGUAGE
>SQL;
>CREATE FUNCTION
>postgres=# select countertest(24);
>  countertest
>-------------
>            1
>(1 row)
>
>
>http://www.postgresql.org/docs/8.4/interactive/xfunc-sql.html
>
>
>--
>Regards,
>Richard Broersma Jr.
>
>Visit the Los Angeles PostgreSQL Users Group (LAPUG)
>http://pugs.postgresql.org/lapug


pgsql-general by date:

Previous
From: Raimon Fernandez
Date:
Subject: Re: Extended Query, flush or sync ?
Next
From: Andy Shellam
Date:
Subject: Re: How to add month.year column validation