Why do subselects in target lists behave differently wrt implicit casts? - Mailing list pgsql-general

From Mike Mascari
Subject Why do subselects in target lists behave differently wrt implicit casts?
Date
Msg-id 40EC3355.80801@mascari.com
Whole thread Raw
Responses Re: Why do subselects in target lists behave differently wrt implicit casts?
List pgsql-general
This is a really trivial question, but I'm curious. Why do
subselects in target lists behave differently than simple queries?

Ex:

[lexus] create temporary table bar (key varchar(32) not null);
CREATE TABLE
[lexus] insert into bar select '';
INSERT 1319585 1
[lexus] insert into bar select (select '') as key;
ERROR:  failed to find conversion function from "unknown" to
character varying
[lexus] insert into bar select (select ''::text) as key;
INSERT 1319586 1

Just curious,

Mike Mascari




pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Help with query: indexes on timestamps
Next
From: Richard Huxton
Date:
Subject: Re: Getting user who fired a trigger