Re: Varchar concatenate fields as Char or Varchar, not Text

Поиск
Список
Период
Сортировка
От MargaretGillon@chromalloy.com
Тема Re: Varchar concatenate fields as Char or Varchar, not Text
Дата
Msg-id OF85723C5A.720F0B2E-ON882571C3.006B3F4D-882571C3.006BB4EF@CHROMALLOY.COM
обсуждение исходный текст
Ответ на Re: Varchar concatenate fields as Char or Varchar, not  (Scott Marlowe <smarlowe@g2switchworks.com>)
Список pgsql-general

>Scott Marlowe <smarlowe@g2switchworks.com> wrote on 08/07/2006 12:18:17 PM:
>

> Just FYI, text and varchar are, internally, pretty much the same types.
> varchar has an optional precision setting as in varchar(200) while text
> does not allow one.
>
> All the text ops are written for text types, so varchar gets cast as
> text (as do char types) before being operated on.
>
> Note that you can cast the result of that select above to varchar:
>
> SELECT (c.refullname || d.enname || f.evname)::varchar AS evlinkname1

This is what another person , Rodrigo Gonzalez, also wrote for me to do and it worked great. Thank you for explaining about the internal function of text and varchar, it is always good to understand more.

Again, my thanks to everyone who gave me a solution.

Margaret Gillon

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Varchar concatenate fields as Char or Varchar, not
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: Practical maximums (was Re: PostgreSQL theoretical