Re: [PERFORM] pgsql do not handle NULL constants in the view

2008-08-20 Thread Sergey Hripchenko
Hripchenko Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] pgsql do not handle NULL constants in the view Sergey Hripchenko <[EMAIL PROTECTED]> writes: > CREATE OR REPLACE VIEW bar AS > SELECT * > FROM ( > ( > SELECT calldate, duration, billsec, > ge

Re: [PERFORM] pgsql do not handle NULL constants in the view

2008-08-20 Thread Tom Lane
Sergey Hripchenko <[EMAIL PROTECTED]> writes: > CREATE OR REPLACE VIEW bar AS > SELECT * > FROM ( > ( > SELECT calldate, duration, billsec, > get_asterisk_cdr_caller_id(accountcode) AS caller_id > FROM asterisk_cdr > ) UNION ALL ( > SELECT start_time, get_interval_s

[PERFORM] pgsql do not handle NULL constants in the view

2008-08-20 Thread Sergey Hripchenko
Hi all, Looks like I found a bug with views optimization: For example create a test view: CREATE OR REPLACE VIEW bar AS SELECT * FROM ( ( SELECT calldate, duration, billsec, get_asterisk_cdr_caller_id(accountcode) AS caller_id FROM asterisk_cdr ) UNION ALL ( SELE

Re: [PERFORM] pgsql do not handle NULL constants in the view

2008-08-20 Thread Sergey Hripchenko
Forgot to add asteriskpilot=> SELECT version(); version PostgreSQL 8.2.9 on i386-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20070925 (Re