On Wed, Nov 29, 2006 at 01:45:09PM -0600, Kevin Grittner wrote:
> > And do what? The only information you have is that all the inputs
> > are of unknown type.
> I know this is naive, but, what is the type information of the bare
> null? Could that be used?
A null can be of any type, string, text, integer, etc. If you have a
bare null in a query, it gets type "unknown" and the system has to
guess. Looking up possible matching operators and functions can help,
but if none of those possibilites help, it gets assigned type "text".
That's why as soon as one entry has a type, it works because the system
can assume the others are of the same type.
Compare this with pointers in C. There you can have a char ponter and
and an integer pointer, both NULL yet they cannot be used
interchangably, they are of different types.
I'm curious how in such a strongly typed language as Java you represent
a null without any associated type. Or does Java not distinguish
Does this help?
Have a nice day,
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
In response to
pgsql-general by date
|Next:||From: Richard Huxton||Date: 2006-11-29 20:11:23|
|Subject: Re: coalesce with all nulls can only be assigned to|
|Previous:||From: Andrus||Date: 2006-11-29 19:49:47|
|Subject: Re: How to implement backup protocol|