All,
In the pg_dump output is the command:
COPY event_tbl (d1, ..., evt_id) FROM stdin;
followed by all the data for the table. There are
23040 rows. The last value for evt_id is 23040. So
far so good. Then the last statement in the pg_dump
output is:
SELECT pg_catalog.setval('event_tbl_evt
On Tue, Apr 12, 2005 at 08:58:41AM -0700, Bill Chandler wrote:
> I did not intend to put explicit values in the
> 'evt_id' column. I thought the six values in the
> insert command correspond to the 1st six columns in
> the create table command, namely d1, obj_id, d2, val,
> correction and delta an
I did not intend to put explicit values in the
'evt_id' column. I thought the six values in the
insert command correspond to the 1st six columns in
the create table command, namely d1, obj_id, d2, val,
correction and delta and 'evt_id' is set to the
nextval() automagically. Is that not correct?
On Tue, Apr 12, 2005 at 08:48:15AM -0700, Bill Chandler wrote:
> How does one find out the current sequence value? Is
> there a way to change it?
Using the function setval() you can change it. SELECT * from
sequencename to find out.
--
Alvaro Herrera (<[EMAIL PROTECTED]>)
"Si quieres ser crea
I was able to get a pg_dump of the table in question.
It has 23040 rows in it. evt_id column ranges from 1
to 23040.
I used the dump to create a new database. All inserts
fail with same error (unique constraint violation).
However, I am wondering if this is just the result of
the fact that
On Tue, Apr 12, 2005 at 07:59:55AM -0700, Bill Chandler wrote:
> I'm sorry, was working on little sleep yesterday. You
> are right, the table was created with the columns in
> the following order:
>
> d1, obj_id, d2, val, correction, delta, evt_id
>
> The insert command looks something like:
>
I'm sorry, was working on little sleep yesterday. You
are right, the table was created with the columns in
the following order:
d1, obj_id, d2, val, correction, delta, evt_id
The insert command looks something like:
INSERT INTO EVENT_TBL VALUES(1039850293991, 145,
1039110343000, '10.25', 1, 739
On Mon, 2005-04-11 at 11:03 -0700, Bill Chandler wrote:
> ERROR: duplicate key violates unique constraint
> event_tbl_evt_id_key
> EVENT_TBL
> evt_id bigserial, unique
> d1 numeric(13)
> obj_id numeric(6)
> d2 numeric(13)
> val varchar(22)
> correction n
Tom,
This is not the EXACT command (don't have that since
this a client site and they did not have logging
turned on) but the insert command would have looked
something like:
INSERT INTO EVENT_TBL VALUES(1039850293991, 'X.Y.Z',
1039110343000, '10.25', 1, 739950991)
For what its worth, the comman
Bill Chandler <[EMAIL PROTECTED]> writes:
> Client is getting the following error when attempting
> to do an insert on a table:
> ERROR: duplicate key violates unique constraint
> event_tbl_evt_id_key
What's the exact query (or queries) causing this? Do you have any
triggers or rules that might
10 matches
Mail list logo