pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ilja Golshtein <ilejn@yandex.ru>
To: tgl@sss.pgh.pa.us
Cc: pgsql-general@postgresql.org
Subject: Re: Old question - failed to find conversion function from "unknown"
Date: Tue, 19 Jul 2005 19:01:05 +0400 (MSD)
Message-ID: <42DD15B1.000004.19702@mfront8.yandex.ru> (raw)
In-Reply-To: <23591.1121782655@sss.pgh.pa.us>
References: <42DCC1E9.2060300@aeccom.com>
	<42DCCCCE.000006.04382@mfront8.yandex.ru>
	<42DCDE07.4020906@archonet.com>
	<42DCEFEE.000005.12199@mfront8.yandex.ru>
	<23591.1121782655@sss.pgh.pa.us>

Hello!

>>> Well, it would obviously be better if PG could figure out it was safe, 
>>> but I'm not sure there's a general case where it is. You can see it's OK 
>>> because you know there's only one row in your SELECT result-set. 
>
>> I think, it's OK because NULL can be compared with anything 
>> with predictable result and no additional information about 
>> types is necessary.
>> Is it correct vision?
>
>The backend doesn't really distinguish NULL from 'foo' (or untyped
>string literals in general) when making datatype decisions. 

I think when PG is about to compare object of known type and known
value (it is 5 in my example) with object with unknown type
but known value or known null flag (it is null in my example) it is
high time to return 'false' instead of producing error.

As far as I understand, it is not about comparision only, 
but about any operation.

I really believe NULLs are special here.

Of course I am a complete stranger and unaware of PostgreSQL internals
so what I am saying may contradict with some basical concepts. Looks like
it does since according to Tom, PostgreSQL does not treat null literals
in special way :(

Thanks.

-- 
Best regards
Ilja Golshtein



view thread (8+ messages)  latest in thread

Message-ID: <42DD15B1.000004.19702@mfront8.yandex.ru>
Permalink:  ../42DD15B1.000004.19702@mfront8.yandex.ru/
Also on:    postgresql.org/message-id/42DD15B1.000004.19702@mfront8.yandex.ru

 · 

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-admin@postgresql.org
  Cc: ilejn@yandex.ru, tgl@sss.pgh.pa.us, pgsql-general@postgresql.org
  Subject: Re: Old question - failed to find conversion function from "unknown"
  In-Reply-To: <42DD15B1.000004.19702@mfront8.yandex.ru>
  References: <42DCC1E9.2060300@aeccom.com> <42DCCCCE.000006.04382@mfront8.yandex.ru> <42DCDE07.4020906@archonet.com> <42DCEFEE.000005.12199@mfront8.yandex.ru> <23591.1121782655@sss.pgh.pa.us> <42DD15B1.000004.19702@mfront8.yandex.ru>

* 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