From: | Os Tyler <ort(at)yompy(dot)K4AZL(dot)NET> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | sequences/operators |
Date: | 1998-08-18 18:18:47 |
Message-ID: | Pine.LNX.3.96.980818111723.15941B-100000@yompy.K4AZL.NET |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Przemyslaw Bak | 1998-08-19 08:50:52 | Backup of postgres |
Previous Message | Jeremiah Davis | 1998-08-18 15:54:08 | Re: [GENERAL] The use of sequences |