Re: type unknown - how important is it? - Mailing list pgsql-hackers

From Russell Smith
Subject Re: type unknown - how important is it?
Date
Msg-id 200503160802.39868.mr-russ@pws.com.au
Whole thread Raw
In response to Re: type unknown - how important is it?  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-hackers
On Wed, 16 Mar 2005 05:17 am, Dave Cramer wrote:
> Shachar,
> 
> I think with type oid 705 (unknown) it's safe to treat it as text. 
> Certainly better than punting.
> 
> On another note are you aware of any issues with transactions? 
> Specifically with using the dated autocommit mode ?
> 
> Dave
> 
> Shachar Shemesh wrote:
> 
> > Tom Lane wrote:
> >
> >> Dave Cramer <pg@fastcrypt.com> writes:
> >>  
> >>
> >>> I just had a customer complain about this. My understanding is that 
> >>> unkown is a constant which has not been typed yet. Is it possible 
> >>> for it to be a binary type, if so how ?
> >>> I would think it should only ever be a string?
> >>>   
> >>
> >>
> >> You can read "unknown" as "string literal for which the query does not
> >> provide sufficient context to assign a definite type".  I dunno what the
> >> OLE driver really needs to do with the datatype info, but I suppose that
> >> treating this as equivalent to "text" is not unreasonable.  Ask the
> >> complainant what *he* thinks it should do.
> >>
> >>             regards, tom lane
> >>  
> >>
[snip]
> >
> > On the good news front, Version 1.0.0.17 is about ready to be released 
> > (initial schema support). I am resuming development after about half a 
> > year of doing other stuff.
> >
> >             Shachar
> >
> 
I have complained about this in the past, and would also suggest that it be treated as a
string value.

CREATE table b AS SELECT 'unknown', col2 from a;

Will even create a table with a column type as unknown, which doesn't have any operators
to convert to anything, including text.

Regards

Russell Smith.


pgsql-hackers by date:

Previous
From: Dave Cramer
Date:
Subject: Re: type unknown - how important is it?
Next
From: Bruce Momjian
Date:
Subject: Re: signed short fd