pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julius Tuskenis <julius@nsoft.lt>
To: Tony Liao <tonyliao@yuehetone.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: String concatenation work in version 8.2.11 and 8.3.6
Date: Thu, 26 Feb 2009 11:23:53 +0200
Message-ID: <49A65FA9.1000809@nsoft.lt> (raw)
In-Reply-To: <8f750b7c0902260032u76d11ca8p1349fec8e899d36c@mail.gmail.com>
References: <8f750b7c0902260032u76d11ca8p1349fec8e899d36c@mail.gmail.com>

Hi Tony,

Its not a bug - automatic casting was removed in 8.3. You should cast( a 
as text)||cast(b ... = cast(123456 as text). Other option is to define 
your own operators which is to be used only in case you can not fix 
clients of your database...

Tony Liao rašė:
> hi,all
>       for example tableA
>       create table tableA (
>        id serial,
>        a integer,
>        b integer,
>        c integer
>       );
>       insert into tableA (a,b,c) values (12,34,56);
>
> then,
>       select id from tableA where (a||b||c)=123456;
>       in postgresql version 8.2.11,it works.
>       but in postgresql version 8.3.6,the error as bellow:
>        ERROR:  operator does not exist: integer || integer
>        LINE 1: select id from tableA where (a||b||c)=123456;
>                                       ^
>        HINT:  No operator matches the given name and argument type(s). 
> You might need to add explicit type casts.
>
> is it a bug in 8.2.11 or I install 8.3.6 not completely?


-- 
Julius Tuskenis
Programavimo skyriaus vadovas
UAB nSoft
mob. +37068233050




view thread (3+ messages)  latest in thread

Message-ID: <49A65FA9.1000809@nsoft.lt>
Permalink:  ../49A65FA9.1000809@nsoft.lt/
Also on:    postgresql.org/message-id/49A65FA9.1000809@nsoft.lt

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: julius@nsoft.lt, tonyliao@yuehetone.com
  Subject: Re: String concatenation work in version 8.2.11 and 8.3.6
  In-Reply-To: <49A65FA9.1000809@nsoft.lt>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox