c k 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, st
sage-
> From: pgsql-general-ow...@postgresql.org
> [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Philip Couling
> Sent: Friday, March 02, 2012 4:47 PM
> To: david.sahag...@emc.com
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] || versus concat( ), diff
lip Couling
> Sent: Friday, March 02, 2012 4:47 PM
> To: david.sahag...@emc.com
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] || versus concat( ), diff behavior
>
> On 02/03/12 20:58, david.sahag...@emc.com wrote:
> > Can anybody please point me to where this "differe
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Philip Couling
Sent: Friday, March 02, 2012 4:47 PM
To: david.sahag...@emc.com
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] || versus concat( ), diff behavior
On
On 02/03/12 20:58, david.sahag...@emc.com wrote:
Can anybody please point me to where this "difference of behavior" is
explained/documented ?
Thanks,
-dvs-
-- version = 9.1.3
do $$
declare
v_str char(10);
begin
v_str := 'abc' ;
raise info '%', concat(v_str, v_str) ;
raise info '%',
On Mar 2, 2012, at 12:58 PM, wrote:
> Can anybody please point me to where this "difference of behavior" is
> explained/documented ?
> Thanks,
> -dvs-
>
> -- version = 9.1.3
> do $$
> declare
> v_str char(10);
> begin
> v_str := 'abc' ;
> raise info '%', concat(v_str, v_str) ;
> raise info
Can anybody please point me to where this "difference of behavior" is
explained/documented ?
Thanks,
-dvs-
-- version = 9.1.3
do $$
declare
v_str char(10);
begin
v_str := 'abc' ;
raise info '%', concat(v_str, v_str) ;
raise info '%', v_str||v_str ;
end
$$;
INFO: abc abc
INFO: ab