2010/10/8 Tom Lane :
> Pavel Stehule writes:
>> Now I understand to interpretation. But there is little bit difficult
>> to understand to error message. Can be message enhanced to show a
>> complete expression?
>
> It does already:
>
> regression=# select foo();
> ERROR: column "label" does not e
Pavel Stehule writes:
> Now I understand to interpretation. But there is little bit difficult
> to understand to error message. Can be message enhanced to show a
> complete expression?
It does already:
regression=# select foo();
ERROR: column "label" does not exist
LINE 2: <>
^
QU
2010/10/8 Tom Lane :
> Robert Haas writes:
>> On Thu, Oct 7, 2010 at 2:53 PM, Pavel Stehule
>> wrote:
>>> b) SRF functions must not be finished by RETURN statement - I know, so
>>> there is outer default block, but it looks like inconsistency for SRF
>>> functions, because you can use a RETURN N
Hello
2010/10/8 Tom Lane :
> Pavel Stehule writes:
>> a) parser allow a labels on invalid positions with strange runtime bug:
>
>> postgres=# CREATE OR REPLACE FUNCTION foo()
>> RETURNS void AS $$
>> BEGIN
>> FOR i IN 1..2
>> <<>
>> LOOP
>> RAISE NOTICE '%',i;
>> END LOOP;
>> END;
>>
Pavel Stehule writes:
> a) parser allow a labels on invalid positions with strange runtime bug:
> postgres=# CREATE OR REPLACE FUNCTION foo()
> RETURNS void AS $$
> BEGIN
> FOR i IN 1..2
> <<>
> LOOP
> RAISE NOTICE '%',i;
> END LOOP;
> END;
> $$ LANGUAGE plpgsql;
> CREATE FUNCTION
>
Robert Haas writes:
> On Thu, Oct 7, 2010 at 2:53 PM, Pavel Stehule wrote:
>> b) SRF functions must not be finished by RETURN statement - I know, so
>> there is outer default block, but it looks like inconsistency for SRF
>> functions, because you can use a RETURN NEXT without RETURN. It maybe
>>
>> b) SRF functions must not be finished by RETURN statement - I know, so
>> there is outer default block, but it looks like inconsistency for SRF
>> functions, because you can use a RETURN NEXT without RETURN. It maybe
>> isn't bug - but I am filling it as inconsistency.
Hmmm. Is there any like
On Thu, Oct 7, 2010 at 2:53 PM, Pavel Stehule wrote:
> Hello,
>
> today I found a few bugs:
>
> a) parser allow a labels on invalid positions with strange runtime bug:
>
> postgres=# CREATE OR REPLACE FUNCTION foo()
> RETURNS void AS $$
> BEGIN
> FOR i IN 1..2
> <<>
> LOOP
> RAISE NOTICE '%'
Hello,
today I found a few bugs:
a) parser allow a labels on invalid positions with strange runtime bug:
postgres=# CREATE OR REPLACE FUNCTION foo()
RETURNS void AS $$
BEGIN
FOR i IN 1..2
<<>
LOOP
RAISE NOTICE '%',i;
END LOOP;
END;
$$ LANGUAGE plpgsql;
CREATE FUNCTION
ERROR: column