BUG #6020: Wrong data type returned after CAST in FROM

Поиск
Список
Период
Сортировка
От Skylar Hawk
Тема BUG #6020: Wrong data type returned after CAST in FROM
Дата
Msg-id 201105102236.p4AMaW5e038211@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #6020: Wrong data type returned after CAST in FROM
Re: BUG #6020: Wrong data type returned after CAST in FROM
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      6020
Logged by:          Skylar Hawk
Email address:      skylar.j.hawk@gmail.com
PostgreSQL version: 9.0.3
Operating system:   OpenBSD
Description:        Wrong data type returned after CAST in FROM
Details:

Hello,

I noticed a strange nuance. When I do a regular select on data that I CAST
as a CHAR(), the data I am returned is of type character() as I would
expect. For example:

SELECT
    CAST('abcd' AS CHAR(4)) AS data

This returns 'abcd' where the type is character(4).

However, if I do the cast in the FROM portion of the query such as this:

SELECT
    data
FROM
    CAST('abcd' AS CHAR(4)) AS data

then I am returned 'abcd' and the type is bpchar.

I did not have this issue when I was using Postgres 8.4. I upgraded last
week, and that's when I noticed the issue in a couple database functions I
had written.

-Sky

В списке pgsql-bugs по дате отправления:

Предыдущее
От: 李紅兵
Дата:
Сообщение: Re: BUG #5994: Can't excute DBI->connect to oracle by client site
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: BUG #5994: Can't excute DBI->connect to oracle by client site