[GENERAL] Queyring for columns which are exist in table.

2011-01-25 Thread Santosh Bhujbal (sabhujba)
Hi All, I want to fire a query such that if the particular column does not exist then query should return some default value. For that I have tried following experiment. CREATE TABLE tbl ( c1 integer, c2 integer, c3 integer ); INSERT INTO tbl VALUES (1, 2, 3); INSERT I

[GENERAL] Queyring for columns which are exist in table.

2011-01-27 Thread Santosh Bhujbal (sabhujba)
Hi All, I want to fire a query such that if the particular column does not exist then query should return some default value. For that I have tried following experiment. SETUP details: Platform : Sun Solaris 5.10 Postgres : 8.3.7 CREATE TABLE tbl ( c1 integer,

Re: [GENERAL] Queyring for columns which are exist in table.

2011-01-27 Thread Santosh Bhujbal (sabhujba)
at it take care of newly added columns. Thanks, Santosh. -Original Message- From: Thom Brown [mailto:t...@linux.com] Sent: Thursday, January 27, 2011 3:09 PM To: Santosh Bhujbal (sabhujba) Cc: pgsql-...@postgresql.org; pgsql-general@postgresql.org Subject: Re: [GENERAL] Queyring for co