Re: type unknown - how important is it?

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Shachar Shemesh <psql(at)shemesh(dot)biz>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: type unknown - how important is it?
Date: 2005-03-15 12:34:18
Message-ID: 4236D64A.10501@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Shachar,

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?

his particular case is select 'picture.jpg' as icon1, 'picture2.jpg' as
icon3 ...

The jdbc driver handles this by parsing the data at the time of the
getXXX call where getXXX could be getString, getInt, getDate, etc.

I have zero knowledge if this is possible in the oledb environment.

Dave

Shachar Shemesh wrote:

> Joshua D. Drake wrote:
>
>> Shachar Shemesh wrote:
>>
>>> I have a complaint from an OLE DB user that when he does "select
>>> 'a'", he gets an "unhanded type" error. Since OLE DB uses a binary
>>> interface, it has to know about all variable types that pass through
>>> it.
>>>
>>> The debug information for the problem show that the returned type is
>>> 705, which is "unknown". My question is - what is "unknown" used
>>> for? Is it important to support binary send and receives with this
>>> type? Does postgresql know how to convert it to other types?
>>>
>>> I was under the impression that 'a' would be "text". Why is
>>> "unknown" used instead?
>>
>>
>>
>> Try casting a to varchar. Which is binary compatible but understood
>> by ODBC/OLE DB.
>
>
> Hmm, I did not explain myself clearly enough.
>
> I maintain the OLE DB provider. My question was not that. My question
> was whether I should add support to unknown? If so, what type should
> it be represented to outside applications?
>
> If unknown is binary compatible to text, I can just pass it on as text
> and have it done with. The question is whether that makes sense,
> whether it makes more sense to pull and error if that happens, or
> whether there is something else which I should do.
>
> Thanks,
>
> Shachar
>

--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2005-03-15 12:43:17 Re: PHP stuff
Previous Message Mark Woodward 2005-03-15 11:08:48 Re: PHP stuff