pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedUnable to identify a right operator '>=' for type 'bpchar'
3+ messages / 2 participants
[nested] [flat]
* Unable to identify a right operator '>=' for type 'bpchar'
@ 2000-05-24 15:21 Michael Ma <mikema@ficnet.net>
2000-05-24 16:33 ` Re: Unable to identify a right operator '>=' for type 'bpchar' Tom Lane <tgl@sss.pgh.pa.us>
2000-05-24 17:21 ` Re: Unable to identify a right operator '>=' for type 'bpchar' (solved) Michael Ma <mikema@ficnet.net>
0 siblings, 2 replies; 3+ messages in thread
From: Michael Ma @ 2000-05-24 15:21 UTC (permalink / raw)
To: pgsql-sql
Hi,
While running the following SQL statement in postgresql-7.0-1 via
JDBC,
select a.cus_code, a.dlv_code, b.cus_abbr, a.dlv_abbr,
a.address, a.tel, a.fax, a.contact
from dlv_point a, customer b
where ((a.cus_code >= ? and a.cus_code <= ?)
or (b.cus_abbr >= ? and b.cus_abbr <= ?))
and trim(b.cus_code) = trim(a.cus_code)
order by 1 ;
I got the following error message:
Unable to identify a right operator '>=' for type 'bpchar'
You may meed to add parentheses or an explicit cast.
I have never got this kind of message from Informix or Oracle.
The data type of the fields in the above statement are all char(n).
Can anyone help?
The system I am using is Red Hat Linux 6.2 with Kernel 2.2.14-6.1.1 on
an i586
Thanks in advance.
Michael
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Unable to identify a right operator '>=' for type 'bpchar'
2000-05-24 15:21 Unable to identify a right operator '>=' for type 'bpchar' Michael Ma <mikema@ficnet.net>
@ 2000-05-24 16:33 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2000-05-24 16:33 UTC (permalink / raw)
To: Michael Ma <mikema@ficnet.net>; +Cc: pgsql-sql
Michael Ma <mikema@ficnet.net> writes:
> While running the following SQL statement in postgresql-7.0-1 via
> JDBC,
> select a.cus_code, a.dlv_code, b.cus_abbr, a.dlv_abbr,
> a.address, a.tel, a.fax, a.contact
> from dlv_point a, customer b
> where ((a.cus_code >= ? and a.cus_code <= ?)
> or (b.cus_abbr >= ? and b.cus_abbr <= ?))
> and trim(b.cus_code) = trim(a.cus_code)
> order by 1 ;
> I got the following error message:
> Unable to identify a right operator '>=' for type 'bpchar'
> You may meed to add parentheses or an explicit cast.
It looks to me like the parser is thinking that "a.cus_code >= ?"
must represent application of a suffix operator '>=' followed by
application of another suffix operator '?'. Which is indeed about
the only way it could make any sense of the expression.
I assume you were expecting something to get substituted for the '?'
marks before the query is submitted, but it evidently didn't happen ...
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Unable to identify a right operator '>=' for type 'bpchar' (solved)
2000-05-24 15:21 Unable to identify a right operator '>=' for type 'bpchar' Michael Ma <mikema@ficnet.net>
@ 2000-05-24 17:21 ` Michael Ma <mikema@ficnet.net>
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ma @ 2000-05-24 17:21 UTC (permalink / raw)
To: pgsql-sql
It is solved and closed now.
Thanks
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2000-05-24 17:21 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-05-24 15:21 Unable to identify a right operator '>=' for type 'bpchar' Michael Ma <mikema@ficnet.net>
2000-05-24 16:33 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-05-24 17:21 ` Re: Unable to identify a right operator '>=' for type 'bpchar' (solved) Michael Ma <mikema@ficnet.net>
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