Re: Handle untype-cast string as VARCHAR instead of TEXT

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Handle untype-cast string as VARCHAR instead of TEXT
Дата
Msg-id CAKFQuwYxZ1mwfxU23nziEwCvHrLJjamBJ6+YVxh-4_2NfCuoWA@mail.gmail.com
обсуждение исходный текст
Ответ на Handle untype-cast string as VARCHAR instead of TEXT  (gmb <gmbouwer@gmail.com>)
Ответы Re: Handle untype-cast string as VARCHAR instead of TEXT  (gmb <gmbouwer@gmail.com>)
Список pgsql-sql
On Tue, May 17, 2016 at 8:58 AM, gmb <gmbouwer@gmail.com> wrote:
Hi all

I'm dealing with a system where string values is queried but not necessary
type-cast.
E.g.
SELECT case when some_value=1 then 'some string' else 'another string' end
FROM some_table;
This will return a column cast as type TEXT;

Is there some configuration option (or hack?) available which will return
above as VARCHAR ?

I'm using 3rd party software where a VARCHAR value displays much better than
TEXT.
I know best practice will be to type-cast , but I'm hoping for a quick-fix
here :)

​No, there is not.

David J.
 

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

Предыдущее
От: gmb
Дата:
Сообщение: Handle untype-cast string as VARCHAR instead of TEXT
Следующее
От: gmb
Дата:
Сообщение: Re: Handle untype-cast string as VARCHAR instead of TEXT