Re: a query on stored procedures/functions in pgsql - Mailing list pgsql-general

From Pavel Stehule
Subject Re: a query on stored procedures/functions in pgsql
Date
Msg-id AANLkTi=CUMmO3L2HAj24Jdbs-TU0Kb55BdACHh3HEq0G@mail.gmail.com
Whole thread Raw
In response to Re: a query on stored procedures/functions in pgsql  ("Neil D'Souza" <neil.xavier.dsouza@gmail.com>)
List pgsql-general
Hello

2010/10/21 Neil D'Souza <neil.xavier.dsouza@gmail.com>:
>>
>> You have same plpgsql identifiers as sql identifiers, and because
>> plpgsql identifiers has higher priority, your query is broken. For
>> simple functions like this don't use a plpgsql language - use sql
>> language instead.
>>
>
> Thank you for the quick reply. The example I constructed was
> specifically for this post. I modified the function as below and it
> works fine now. It would be great if the point you mentioned was a
> note in the PGSQL Documentation (or did I miss it). In case I didnt
> miss it, Is there anyone I have to write to, to help get this note in?
>

yes, it's probably undocumented :(. see - unofficial plpgsql
documentation
http://www.pgsql.cz/index.php/PL/pgSQL_%28en%29#Recommendation_for_design_of_saved_procedures_in_PL.2FpqSQL_language

but it is solved on 9.0, where you will got adequate error message.

Regards

Pavel Stehule

pgsql-general by date:

Previous
From: "Neil D'Souza"
Date:
Subject: Re: a query on stored procedures/functions in pgsql
Next
From: Tim Uckun
Date:
Subject: Re: Updates, deletes and inserts are very slow. What can I do make them bearable?