Re: [SQL] dblinks

2008-05-19 Thread Dave Page
On Mon, May 19, 2008 at 4:06 AM, Ramasubramanian G <[EMAIL PROTECTED]> wrote: > HI Sumaya, > > This is the way you have to use dblink. And one more think. To > excute this query you nedd to have dblink functions installed in your > database schema. > > select * from dblink('YOUR_DB_LINK

[SQL] Supplying a default on read, if a column does not exist in DB

2008-05-19 Thread Bryce Nesbitt
Is there a clean way in Postgres to specify a default return value, if a column does not exist in a database? In pseudocode: select p_email, CASE WHEN EXISTS("p_email_alt") THEN p_email_alt ELSE 'none' END from eg_application; I can kind of almost get there with: select p_email, CASE WHEN EXI