Re: Initializing variables from SQL query

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Initializing variables from SQL query
Дата
Msg-id 200903191941.44861.aklaver@comcast.net
обсуждение исходный текст
Ответ на Initializing variables from SQL query  (jc_mich <juan.michaca@paasel.com>)
Список pgsql-general
On Thursday 19 March 2009 5:25:03 pm jc_mich wrote:
> Hi all
>
> I'm new in PL/PGSQL developing, I'm trying to initialize a variable from a
> SQL query, this query counts some rows, I've made the next code, but it
> doesn't work.
>
> CREATE FUNCTION schema.myFunction() RETURNS BOOLEAN AS $$
> DECLARE
>     counter RECORD;
> BEGIN
>     SELECT * INTO STRICT counter FROM (SELECT COUNT (DISTINCT (rows)) FROM
> schema.table);
>
> I'm pretty annoyed, because I've found some examples that use this kind of
> variable initialization.
>
> Is there someone who know what I did wrong?
>
> Thanks!
>
> --
> View this message in context:
> http://www.nabble.com/Initializing-variables-from-SQL-query-tp22612191p2261
>2191.html Sent from the PostgreSQL - general mailing list archive at
> Nabble.com.

What is the error you are getting?

--
Adrian Klaver
aklaver@comcast.net

В списке pgsql-general по дате отправления:

Предыдущее
От: jc_mich
Дата:
Сообщение: Initializing variables from SQL query
Следующее
От: ray
Дата:
Сообщение: Re: Installation Error, Server Won't Start