pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem with coalesce..
4+ messages / 4 participants
[nested] [flat]
* Problem with coalesce..
@ 2000-10-31 21:52 George Henry C. Daswani <gdaswani@esri.com>
0 siblings, 2 replies; 4+ messages in thread
From: George Henry C. Daswani @ 2000-10-31 21:52 UTC (permalink / raw)
To: pgsql-sql; +Cc: pgsql-general@postgresql.org
Hello,
Was wondering if such a call is unsupported, or a bug?
7.0.2 (postgresql, linux redhat 7.0)
SELECT COALESCE ((SELECT NULL,1)
returns a 1, correct..
however..
SELECT COALESCE ((SELECT CURVALUE FROM TABLEKEYS WHERE TABLENAME = 'BUYER'),1)
returns a "UNKNOWN expression type 501"
SELECT CURVALUE FROM TABLEKEYS WHERE TABLENAME = 'BUYER'; returns a '0'
Thanks..
George
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problem with coalesce..
@ 2000-11-01 15:01 Continuing Technical Education <CTE@Dal.Ca>
parent: George Henry C. Daswani <gdaswani@esri.com>
1 sibling, 0 replies; 4+ messages in thread
From: Continuing Technical Education @ 2000-11-01 15:01 UTC (permalink / raw)
To: George Henry C. Daswani <gdaswani@esri.com>; +Cc: pgsql-sql
Try:
SELECT COALESCE(CURVALUE,1) FROM TABLEKEYS WHERE TABLENAME = 'BUYER';
----- Original Message -----
From: George Henry C. Daswani
To: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Sent: Tuesday, October 31, 2000 5:52 PM
Subject: [SQL] Problem with coalesce..
Hello,
Was wondering if such a call is unsupported, or a bug?
7.0.2 (postgresql, linux redhat 7.0)
SELECT COALESCE ((SELECT NULL,1)
returns a 1, correct..
however..
SELECT COALESCE ((SELECT CURVALUE FROM TABLEKEYS WHERE TABLENAME = 'BUYER'),1)
returns a "UNKNOWN expression type 501"
SELECT CURVALUE FROM TABLEKEYS WHERE TABLENAME = 'BUYER'; returns a '0'
Thanks..
George
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problem with coalesce..
@ 2000-11-01 16:50 Stephan Szabo <sszabo@megazone23.bigpanda.com>
parent: George Henry C. Daswani <gdaswani@esri.com>
1 sibling, 1 reply; 4+ messages in thread
From: Stephan Szabo @ 2000-11-01 16:50 UTC (permalink / raw)
To: George Henry C. Daswani <gdaswani@esri.com>; +Cc: pgsql-sql; pgsql-general@postgresql.org
There are still some contexts in which subqueries in expressions are
wierd. The example below appears to work in current sources however.
Stephan Szabo
sszabo@bigpanda.com
On Tue, 31 Oct 2000, George Henry C. Daswani wrote:
> Hello,
>
> Was wondering if such a call is unsupported, or a bug?
>
> 7.0.2 (postgresql, linux redhat 7.0)
>
> SELECT COALESCE ((SELECT NULL,1)
>
> returns a 1, correct..
>
> however..
>
> SELECT COALESCE ((SELECT CURVALUE FROM TABLEKEYS WHERE TABLENAME = 'BUYER'),1)
>
> returns a "UNKNOWN expression type 501"
>
> SELECT CURVALUE FROM TABLEKEYS WHERE TABLENAME = 'BUYER'; returns a '0'
>
> Thanks..
>
> George
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [SQL] Re: Problem with coalesce..
@ 2000-11-02 08:09 Tom Lane <tgl@sss.pgh.pa.us>
parent: Stephan Szabo <sszabo@megazone23.bigpanda.com>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2000-11-02 08:09 UTC (permalink / raw)
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>; +Cc: George Henry C. Daswani <gdaswani@esri.com>; pgsql-sql; pgsql-general@postgresql.org
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> There are still some contexts in which subqueries in expressions are
> wierd. The example below appears to work in current sources however.
>> SELECT COALESCE ((SELECT CURVALUE FROM TABLEKEYS WHERE TABLENAME = 'BUYER'),1)
>> returns a "UNKNOWN expression type 501"
AFAICT it works in 7.0.* as well. Are you sure this was 7.0.2, and
not 6.5.something?
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2000-11-02 08:09 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-31 21:52 Problem with coalesce.. George Henry C. Daswani <gdaswani@esri.com>
2000-11-01 15:01 ` Continuing Technical Education <CTE@Dal.Ca>
2000-11-01 16:50 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2000-11-02 08:09 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox