pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
8.3/8.4 SQL incompatibility?
2+ messages / 2 participants
[nested] [flat]

* 8.3/8.4 SQL incompatibility?
@ 2009-12-16 17:31 Britt Piehler <brittp@labkey.com>
  2009-12-16 20:23 ` Re: 8.3/8.4 SQL incompatibility? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Britt Piehler @ 2009-12-16 17:31 UTC (permalink / raw)
  To: pgsql-sql

A generated query of ours broke on upgrade from PG 8.3.3 to 8.4.1 with 
the following error:
ERROR: failed to find conversion function from unknown to character varying
SQL state: XX000

I've narrowed it down to sub-selects in union clauses, as in the test 
script below, which runs successfully on 8.3.3, but fails on 8.4.1.  To 
reproduce:
CREATE TABLE temp.TestTable
(
    TestColumn VARCHAR(20)
);

(SELECT A.TestColumn FROM (SELECT 'TestValue' AS TestColumn FROM 
temp.TestTable) A)
UNION
(SELECT B.TestColumn FROM (SELECT TestColumn FROM temp.TestTable) B);

Adding an explicit VARCHAR cast to the 'TestValue' string literal fixes 
the issue. 

This is nearly identical to 
http://archives.postgresql.org/pgsql-hackers/2009-06/msg01356.php, but 
Tom's reply there says that query hasn't worked since 7.1, while my 
query worked in 8.3.3.  Can anyone tell me if this is a known/expected 
incompatibility, or if this is a bug?

Thanks,
Britt



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: 8.3/8.4 SQL incompatibility?
  2009-12-16 17:31 8.3/8.4 SQL incompatibility? Britt Piehler <brittp@labkey.com>
@ 2009-12-16 20:23 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2009-12-16 20:23 UTC (permalink / raw)
  To: Britt Piehler <brittp@labkey.com>; +Cc: pgsql-sql

Britt Piehler <brittp@labkey.com> writes:
> A generated query of ours broke on upgrade from PG 8.3.3 to 8.4.1 with 
> the following error:
> ERROR: failed to find conversion function from unknown to character varying

Hm.  I'm not going to promise that such cases should work always, but
given that this particular case worked before, it'd be nice if it kept
working.  I'll see what I can do about it.  It's too late for 8.4.2
though.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2009-12-16 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-12-16 17:31 8.3/8.4 SQL incompatibility? Britt Piehler <brittp@labkey.com>
2009-12-16 20:23 ` 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