Search Postgresql Archives

Re: || versus concat( ), diff behavior

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

 



c k <shreeseva.learning@xxxxxxxxx> writes:
> what will be the reason for this?

The short answer is that || uses cast-to-text semantics, whereas concat
uses output-function semantics, and char(n) is one of the weird types
for which those are different.  Don't blame us, blame the SQL committee.
Or rather than blaming anybody, stop using char(n); it's a badly
defined data type, and there are almost no cases where varchar or text
isn't preferable.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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