Re: Understanding "unknown" data type - Mailing list pgsql-general

From Tom Lane
Subject Re: Understanding "unknown" data type
Date
Msg-id 1179.1302203983@sss.pgh.pa.us
Whole thread Raw
In response to Re: Understanding "unknown" data type  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-general
Steve Crawford <scrawford@pinpointresearch.com> writes:
> On 04/07/2011 11:29 AM, Tom Lane wrote:
>> Steve Crawford<scrawford@pinpointresearch.com>  writes:
>>> 1. Where can I read up on the purpose and properties of a data-type of
>>> unknown?

>> It's the type initially imputed to unadorned string literals and NULL...

> Is there a place in the documentation that explains this? I haven't
> found it so far.

Probably not --- it's normally just an implementation detail.

>> ...It can be cast to anything, but that's a hardwired behavior not
>> something listed in pg_cast.

> Hmmm. Not *anything* - at least not directly:

Unadorned string literals and NULL constants can be cast to anything.
Once it's not a simple constant anymore, you can't do anything at all
with it.

            regards, tom lane

pgsql-general by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Understanding "unknown" data type
Next
From: Yang Zhang
Date:
Subject: What happened to ALTER SCHEMA ... SET TABLESPACE?