Marc Schablewski <[EMAIL PROTECTED]> writes:
> Now everything seems to work fine, but we are still testing. At least
> what we see in the logs is more reasonable. Now the .backup file is
> requested first, then the WALs. There is one strange thing left, though.
> The server first requests the secon
"Oleg Serov" <[EMAIL PROTECTED]> writes:
> CREATE OR REPLACE FUNCTION "bug_with_triggers" () RETURNS trigger AS
> $body$
> BEGIN
> PERFORM COALESCE(NEW.some_composite_field.field, TRUE);
> END;
> $body$
> LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;
> Error:
> ERROR: N
Sistema operacional Windows XP
Ao tentar iniciar o postgres, o sistema apresenta a seguinte mesagem de
erro:
postgres.exe - erro de aplicativo
exceção unknown software exception (0x4015) em 0x0064a999
com as opções:
ok e cancelar
ao clicar em cancelar para depurar o erro, é apresenta
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 <[EMAIL PROTECTED]>:
> Hello
>
> 2008/12/10 Ole
Hello
2008/12/10 Oleg Serov <[EMAIL PROTECTED]>:
> 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 mai
Hello
you have to use parenthesis, because parser don't distinguish between
variants schema.table.column and variable.field.attrib
example:
postgres=# create or replace function trgbody() returns trigger as $$
begin
raise notice '%', (new.a).a;
return new;
end $$ language plpgsql;
CREATE FUN
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
SQL:
CREATE OR REPLACE FUNCTION "bug_with_triggers" () RETURNS trigger AS
$body$
BEGIN
PERFORM COALESCE(NEW.some_composite_field.field, TRUE);
END;
$body$
LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;
Error:
ERROR: NEW used in query that is not in a rule
QUERY: SEL
Tom Lane wrote:
> Marc Schablewski <[EMAIL PROTECTED]> writes:
>
>> cache_value is set to one for all sequences. As far as I can tell, they
>> were all created by a plain CREATE SEQUENCE seq_name and no other
>> settings changed. And as we found out later this "loss of information"
>> hit some i