PostgresSQL 7.1.3 not parsing SELECT portion of SQL correctly

From: "Mark Jeacocke" <mbj(at)ezytools(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: PostgresSQL 7.1.3 not parsing SELECT portion of SQL correctly
Date: 2002-01-30 22:54:17
Message-ID: 00a701c1a9e1$11c9ad10$0101a8c0@advdata.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Mark Jeacocke
Your email address : mbj(at)ezytools(dot)com

System Configuration
---------------------
Architecture (example: Intel Pentium) : AMD Athlon XP 1600

Operating System (example: Linux 2.0.26 ELF) : RedHat Linux 7.0 Kernel
2.4.2

PostgreSQL version (example: PostgreSQL-7.1.3): PostgreSQL-7.1.3

Compiler used (example: gcc 2.95.2) : Downloaded offical RPMS from
Postgres mirror

Please enter a FULL description of your problem:
------------------------------------------------
Seems to be a parsing problem in the select portion of the SQL statement:

select DISTINCT TABLEID, '' AS ALIAS from TABLE; :FAILS
select DISTINCT TABLEID, 'test' AS ALIAS from TABLE; :FAILS
select DISTINCT TABLEID, Null AS ALIAS from TABLE; :FAILS
select DISTINCT TABLEID, trim('') AS ALIAS from TABLE; :SUCCEEDS
select DISTINCT TABLEID, 2 AS ALIAS from TABLE; :SUCCEEDS

I believe all five queries should succeed.

Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

See above.

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Yan Bai 2002-01-31 04:49:11 date format problem
Previous Message Stephan Szabo 2002-01-29 23:37:39 Re: Bug #569: Strange Queries Behaviours