Re: operator is only a shell - Error

2024-03-19 Thread Adrian Klaver
cit type casts.  Position: 19".  Then realized that "numeric=text" works but "numeric=varchar" does not.  I could resolve the problem by creating the following function and operator by commenting "CUMMUTATOR" and "NEGATOR".  Also the error "oper

Re: operator is only a shell - Error

2024-03-19 Thread Rajesh S
and argument types. You might need to add explicit type casts.  Position: 19".  Then realized that "numeric=text" works but "numeric=varchar" does not.  I could resolve the problem by creating the following function and operator by commenting "CUMMUTATOR" and

Re: operator is only a shell - Error

2024-03-18 Thread Adrian Klaver
it_no='0002114029832'; ERROR: operator is only a shell: character varying = numeric LINE 1: select * from deposit_lien where deposit_no='0002114029832' ^ SQL state: 42883 Character: 44 In the above query "deposit_no" column is having "varchar" data type. But before creating

Re: operator is only a shell - Error

2024-03-18 Thread Greg Sabino Mullane
The order of the arguments matter. You need an operator that expects a varchar on the left hand side of the operator, and numeric on the right side. For example: create database cast_test; \c cast_test You are now connected to database "cast_test" as user "greg". cast_test=# create table

Re: operator is only a shell - Error

2024-03-18 Thread Rajesh S
t;numeric" type and passing '1' (as varchar).  To address this I'd created the function and operator as I'd mentioned in the earlier mail.  Even the following query throws error after creating the function and operator. select * from deposit_lien where deposit_no='0002114029832'; ERROR: oper

Re: operator is only a shell - Error

2024-03-15 Thread Greg Sabino Mullane
On Fri, Mar 15, 2024 at 6:26 AM Rajesh S wrote: > I wanted to implement a new "=" (equal) operator with LEFTARG as numeric > and RIGHTARG as varchar. But after creating the function and operator, > psql shows the error "operator is only a shell: character varying = >

operator is only a shell - Error

2024-03-15 Thread Rajesh S
Hi, I wanted to implement a new "=" (equal) operator with LEFTARG as numeric and RIGHTARG as varchar.  But after creating the function and operator, psql shows the error "operator is only a shell: character varying = numeric LINE 1: ...lect LIEN_AC_NO from deposit_lien wh