Re: [BUGS] BUG #4565: nextval not updated during wal replication, leading to pk violations

2008-12-10 Thread Tom Lane
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

Re: [BUGS] Bug in plpgsql, when using NEW with composite field value.

2008-12-10 Thread Tom Lane
"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

[BUGS] Connection refused

2008-12-10 Thread Yuri Steindorfer
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

Re: [BUGS] plpgsql bug OR future request: Assign fileds in composite subfiled. eg. table.compositefield.subfield := TRUE;

2008-12-10 Thread Oleg Serov
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

Re: [BUGS] plpgsql bug OR future request: Assign fileds in composite subfiled. eg. table.compositefield.subfield := TRUE;

2008-12-10 Thread Pavel Stehule
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

Re: [BUGS] Bug in plpgsql, when using NEW with composite field value.

2008-12-10 Thread Pavel Stehule
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

[BUGS] plpgsql bug OR future request: Assign fileds in composite subfiled. eg. table.compositefield.subfield := TRUE;

2008-12-10 Thread Oleg Serov
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

[BUGS] Bug in plpgsql, when using NEW with composite field value.

2008-12-10 Thread Oleg Serov
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

Re: [BUGS] BUG #4565: nextval not updated during wal replication, leading to pk violations

2008-12-10 Thread Marc Schablewski
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