Re: a query on stored procedures/functions in pgsql

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: "Neil D'Souza" <neil(dot)xavier(dot)dsouza(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: a query on stored procedures/functions in pgsql
Date: 2010-10-21 05:00:37
Message-ID: AANLkTi=CUMmO3L2HAj24Jdbs-TU0Kb55BdACHh3HEq0G@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

2010/10/21 Neil D'Souza <neil(dot)xavier(dot)dsouza(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Uckun 2010-10-21 05:05:00 Re: Updates, deletes and inserts are very slow. What can I do make them bearable?
Previous Message Neil D'Souza 2010-10-21 04:48:39 Re: a query on stored procedures/functions in pgsql