From: | Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: What does this error message mean? |
Date: | 2013-11-18 04:10:16 |
Message-ID: | CAD3a31V5g-nTCNiGZizMAQuCE-dLPkR2_Snnn-Ybo-cyKQ2gVw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Agreed. Although given that you can cast text to unknown, and NULL to
text, it's not intuitively clear why this would have to fail absent
replanning. However, knowing nothing about Postgres internals, I'm happy
to take your word for it! Thanks again.
Ken
On Sun, Nov 17, 2013 at 7:59 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> writes:
> > But thinking about it some more, the function runs one of 5 possible
> > queries. 4 of them select NULL as comment (no cast), while the fifth
> (and
> > the one that caused this error) selects 'a string'.
>
> Ah. Fixing that so all the variants produce the same (explicit) type
> should take care of this.
>
> > I assume this will go away if I change my lazy query and cast my NULLs,
> but
> > still wonder if this is something that should be expected to fail?
>
> Ideally it wouldn't, but it's not clear what it'd cost to fix it.
> If we just silently replanned when the query output types changed,
> then this type of situation would work but would carry a large hidden
> performance penalty. That's not too appetizing either.
>
> regards, tom lane
>
--
AGENCY Software
A data system that puts you in control
100% Free Software
*http://agency-software.org/ <http://agency-software.org/>*
ken(dot)tanzer(at)agency-software(dot)org
(253) 245-3801
Subscribe to the mailing
list<agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe>
to
learn more about AGENCY or
follow the discussion.
From | Date | Subject | |
---|---|---|---|
Next Message | Hengky Liwandouw | 2013-11-18 05:21:08 | Re: Sum 2 tables based on key from other table |
Previous Message | Tony Theodore | 2013-11-18 04:07:41 | Re: Composite types or composite keys? |