Re: Problem with || and data types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Peter Darley" <pdarley(at)kinesis-cem(dot)com>
Cc: "Pgsql-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem with || and data types
Date: 2003-05-01 01:34:08
Message-ID: 25761.1051752848@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Peter Darley" <pdarley(at)kinesis-cem(dot)com> writes:
> ... AND Import_Items.Name <>(SELECT QT.Import_As FROM
> Question_Types QT, Border_Type_Translation BTT WHERE QT.Value=BTT.First_Type
> AND BTT.Second_Type=Border_Questions.Type) || ':' ||
> Border_Questions.Field_Name

Actually, the first operator you have there is "<>" not "=". "<>" is
considered a generic Op, just like "||", so the binding will be left-to-
right. AFAIK this was the same in 7.2 and for a good ways before.

In short, you need some parentheses.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Michel POURE 2003-05-01 07:14:29 Join Stallman and Software SMEs to refuse sofware patents
Previous Message Tom Lane 2003-05-01 01:15:40 Re: Problem with || and data types