Re: || operator

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Vinayak <vinpokale(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: || operator
Date: 2014-09-04 05:35:51
Message-ID: CAFj8pRDhj0kLw4y9yHXkjbCjQzxHaiXNC2RFbXLc_HB4aB8+hA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2014-09-04 6:27 GMT+02:00 Vinayak <vinpokale(at)gmail(dot)com>:

> Hello Pavel,
>
> Thank you for reply.
> >postgres=# select 'abc '::char(7) || 'dbe '::char(6);
> > ?column?
> >----------------
> > *abc abc*
> >(1 row)
> but it gives the result "abc abc". It should be "abc dbe".
>
>
yes

create or replace function concat_character(character, character) returns
text as $$ select concat($1,$1)$$ language sql;

is wrong

should be

create or replace function concat_character(character, character) returns
text as $$ select concat($1,$2)$$ language sql;

>
>
>
>
> -----
> Regards,
> Vinayak,
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/operator-tp5817541p5817674.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vinayak 2014-09-04 05:48:52 Re: || operator
Previous Message Brett Mc Bride 2014-09-04 04:43:12 Re: || operator