Error in parser with UNIONS.

From: Chris Albertson <chris(at)topdog(dot)pas1(dot)logicon(dot)com>
To: pgsql-hackers(at)hub(dot)org
Subject: Error in parser with UNIONS.
Date: 1998-05-21 22:39:14
Message-ID: 3564AD12.66C063F3@topdog.logicon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Got no reply on "questions". Someone here may want to
know this...

I think I may have uncovered an error in the parser. The
following is the simplest example that shows the problem.
Maybe a counter needs to be reset by 'union' or checked
after select not statement. I would like to use this syntax
in my libpq program. Is this a bug? Is it already known?

Would someone please e-mail me the syntax for the
"explicit cast" the system wants

I am using 6.3.2 on an Ultra SPARC. The error occurs on
a Linux RH50 Intel system too.

I think the following should work but does not:

testdb=> select 'a' as X
testdb-> union
testdb-> select 'b' as X;
NOTICE: there is more than one operator < for types
NOTICE: unknown and unknown. You will have to retype this query
ERROR: using an explicit cast

Notice that this does work

testdb=> select 'b' as X;
x
-
b
(1 row)

And this works too:

testdb=> select 1 as X
testdb-> union
testdb-> select 2 as X;
x
-
1
2
(2 rows)

--
--Chris Albertson

chris(at)topdog(dot)logicon(dot)com Voice: 626-351-0089 X127
Logicon RDA, Pasadena California Fax: 626-351-0699

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1998-05-21 23:13:35 Time to fix libpgtcl for async NOTIFY
Previous Message Park, Chul-Su 1998-05-21 22:20:30 [QUESTION] backend closed the channel ... after crash usr prog, how can I fix?