Re: Selecting a constant question

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Selecting a constant question
Дата
Msg-id 466DE4C5.9020102@dunslane.net
обсуждение исходный текст
Ответ на Re: Selecting a constant question  ("Larry McGhaw" <lmcghaw@connx.com>)
Ответы Re: Selecting a constant question  ("Dann Corbit" <DCorbit@connx.com>)
Список pgsql-hackers

Larry McGhaw wrote:
> 4) libpq **cannot** describe the maximum internal data size of a char or
> varchar constant!
> Example:  select '123' from <any table>
>
> This is clearly a bug or serious oversight in libpq that should be
> addressed.
>
> The database *knows* this size of the char constant (obviously), and
> should report the size via a metadata call, as all other relational
> databases do.
>
>   
>   

What is not clear to me is why it is so important for you to know the 
length of a piece of data you are supplying. If it is so vitally 
important, you could always cast it, e.g. select '123'::varchar(3)

cheers

andrew


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

Предыдущее
От: "Dann Corbit"
Дата:
Сообщение: Re: Selecting a constant question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Got no response last time on setsockopt post, so I thought I would reiterate.