Re: [HACKERS] Tricky query, tricky response - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Tricky query, tricky response
Date
Msg-id 1203.938876423@sss.pgh.pa.us
Whole thread Raw
In response to Tricky query, tricky response  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: [HACKERS] Tricky query, tricky response
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> However, if you do 
> -    (CASE WHEN 0<(select count(*) from pg_views where viewname = relname)
> -    THEN 'view' ELSE 'table' END)      
> +    'relation'
> if works fine. No nested CASE's?

Nope: no sub-selects in target list.

I'm hoping to fix that soon, but if you want psql to continue to work
with pre-6.6 backends then you'll have to use a different approach.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Re: TO_CHAR()
Next
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Tricky query, tricky response