pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sandro Santilli <strk@keybit.net>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5799: failed to find conversion function from unknown to text
Date: Tue, 21 Dec 2010 09:42:43 -0500
Message-ID: <304.1292942563@sss.pgh.pa.us> (raw)
In-Reply-To: <201012211008.oBLA8evP038251@wwwmaster.postgresql.org>
References: <201012211008.oBLA8evP038251@wwwmaster.postgresql.org>

"Sandro Santilli" <strk@keybit.net> writes:
>  SELECT a, b, ST_RelateMatch(a,b) FROM
>   ( SELECT '101202FFF' as a, 'TTTTTTFFF' as b) as f;
> Results in:
>  ERROR:  failed to find conversion function from unknown to text

Cast those unknown literals to text explicitly, ie

  SELECT a, b, ST_RelateMatch(a,b) FROM
   ( SELECT '101202FFF'::text as a, 'TTTTTTFFF'::text as b) as f;

We don't support doing it the other way because retroactively deciding
at the top level that the sub-select's outputs should have been text
might change the semantics of the sub-select (consider cases involving
DISTINCT for example).

			regards, tom lane



view thread (2+ messages)

Message-ID: <304.1292942563@sss.pgh.pa.us>
Permalink:  ../304.1292942563@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/304.1292942563@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, strk@keybit.net
  Subject: Re: BUG #5799: failed to find conversion function from unknown to text
  In-Reply-To: <304.1292942563@sss.pgh.pa.us>
  References: <201012211008.oBLA8evP038251@wwwmaster.postgresql.org> <304.1292942563@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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