sequences/operators
От | Os Tyler |
---|---|
Тема | sequences/operators |
Дата | |
Msg-id | Pine.LNX.3.96.980818111723.15941B-100000@yompy.K4AZL.NET обсуждение исходный текст |
Список | pgsql-general |
Hello. I have declared a sequence for assigning invoice numbers. When I first began inserting the number from the sequence into tables, there was some message regarding int4. So the simplest solution seemed to be to change the type for "inv_no" to int4. My first question is whether there is an alternative approach which would allow me to define "inv_no" as a simple int. Currently I can insert into the table invoices, but when I try a select: SELECT * FROM invoices WHERE inv_no = '10074'; I get: caxton=> select * from order_details where inv_no = '10074'; NOTICE:there is more than one operator = for types NOTICE:int4 and unknown. You will have to retype this query WARN:using an explicit cast And then with: SELECT * FROM invoices WHERE inv_no == '10074'; I get: NOTICE:there is no operator == for types int4 and unknown NOTICE:You will either have to retype this query using an NOTICE:explicit cast, or you will have to define the operator WARN:== for int4 and unknown using CREATE OPERATOR If anyone could clarify what's going on here, and what the simplest solution may be, I would certainly appreciate it! Great thanks in advance, Os
В списке pgsql-general по дате отправления: