Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>Scott Marlowe <smarlowe@xxxxxxxxxxxxxxxxx> 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux