Re: Possible bug? - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: Possible bug?
Date
Msg-id 20040701123705.X35614@megazone.bigpanda.com
Whole thread Raw
In response to Possible bug?  (Ilir Gashi <I.Gashi@city.ac.uk>)
Responses Re: Possible bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Thu, 1 Jul 2004, Ilir Gashi wrote:

> I saw this 'bug' reported in the Firebird SourceForge website for the
> Firebird 1.0 server. They confirmed it as a bug! I tried it in PostgreSQL
> 7.2 (I know its an old release but I do not have a newer version installed,
> and in any case I am only using the server for reserach purposes).
> PostgreSQL returns no rows for either of the queries. Of course this is the
> case since the attributes F1 and F2 of Table T1 are of type Char whereas
> the select query is making the test with an integer value. Is this the
> intended behaviour?

Technically speaking, I believe the queries are simply invalid without the
presence of casts from the spec's standpoint.

Theoretically, I'd either expect both to give 0 rows (convert 3 into a
string and compare) or both to give 1 row (convert '003' to an integer and
compare) if it didn't error.

What does Oracle do if you insert a value like 'XXX' into the column?

pgsql-bugs by date:

Previous
From: James Robinson
Date:
Subject: Re: subselect on nonexistent column succeeds!!?!
Next
From: Stephan Szabo
Date:
Subject: Re: subselect on nonexistent column succeeds!!?!