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]

 




>"Uwe C. Schroeder" <uwe@xxxxxxxxx> wrote on 08/07/2006 11:30:28 AM:
> Well, you cast all those fields to be concatenated to text. Why should the db
> make a varchar out of that? I seriously doubt that 7.x made a varchar of that
> - but then, 7.2 is very very old.
> So either cast your fields to varchar (i.e. c.refullname::varchar ||
> d.enname::varchar) or cast the result of the concatenation to a varchar.
>
> UC

FYI in 8.1.4 if the cast is changed to varchar the result still comes out as a text field
>> SELECT (c.refullname::varchar || d.enname::varchar || f.evname::varchar) AS evlinkname1,
results in evlinkname1 as text

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