Re: type unknown - how important is it?

From: Russell Smith <mr-russ(at)pws(dot)com(dot)au>
To: pg(at)fastcrypt(dot)com
Cc: Shachar Shemesh <psql(at)shemesh(dot)biz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Postgresql OLE DB development <oledb-dev(at)gborg(dot)postgresql(dot)org>
Subject: Re: type unknown - how important is it?
Date: 2005-03-15 21:02:39
Message-ID: 200503160802.39868.mr-russ@pws.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)fastcrypt(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-03-15 21:10:29 Re: signed short fd
Previous Message PFC 2005-03-15 19:53:13 Re: [PERFORM] Avoiding tuple construction/deconstruction during joining