From: | "Oleg Serov" <serovov(at)gmail(dot)com> |
---|---|
To: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: plpgsql bug OR future request: Assign fileds in composite subfiled. eg. table.compositefield.subfield := TRUE; |
Date: | 2008-12-10 12:41:23 |
Message-ID: | cec7c6df0812100441o56058973h7d5466dac3b4764e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
ERROR: syntax error at or near "("
LINE 15: (row_main_table.subtype).flag := FALSE; -- cannot set
^
********** Ошибка **********
ERROR: syntax error at or near "("
SQL state: 42601
Характеристика:321
2008/12/10 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
> Hello
>
> 2008/12/10 Oleg Serov <serovov(at)gmail(dot)com>:
>> SQL:
>> CREATE TABLE second_type (
>> flag BOOLEAN
>> );
>> CREATE TABLE main_type (
>> subtype second_type
>> );
>> CREATE OR REPLACE FUNCTION "bug_in_tabletypes" () RETURNS pg_catalog.void AS
>> $body$
>> DECLARE
>> row_main_table main_type%rowtype;
>> BEGIN
>> row_main_table.subtype := NULL; -- all okey;
>
>
>
>> row_main_table.subtype.flag := FALSE; -- cannot set
>
> try
> (row_main_table.subtype).flag := FALSE; -- cannot set
>
> regards
> Pavel Stehule
>
>> END;
>> $body$
>> LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;
>>
>> Will produce error:
>>
>>
>> ERROR: syntax error at or near "row_main_table"
>> LINE 1: row_main_table.subtype.flag := FALSE
>> ^
>> QUERY: row_main_table.subtype.flag := FALSE
>> CONTEXT: SQL statement in PL/PgSQL function "bug_in_tabletypes" near line
>>
>> --
>> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-bugs
>>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Yuri Steindorfer | 2008-12-10 15:12:29 | Connection refused |
Previous Message | Pavel Stehule | 2008-12-10 10:46:50 | Re: plpgsql bug OR future request: Assign fileds in composite subfiled. eg. table.compositefield.subfield := TRUE; |