From: | Jean-Christophe Roux <jcxxr(at)yahoo(dot)com> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Sequence skipping values |
Date: | 2006-02-11 14:06:21 |
Message-ID: | 20060211140621.61693.qmail@web35312.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Michael,
I'm running PostgreSQL 7.4.5 on a shared wehosting, which means among other things that I have limited control over the database settings and capabilities, For instance, I cannot install languages and therefore I cannot write triggers.
Yes you are right, I did not show one rule on table topics:
CREATE OR REPLACE RULE topics_last_administrator_id AS
ON INSERT TO topics DO UPDATE topics SET last_administrator_id = new.administrator_id
WHERE topics.topic_id = new.topic_id;
I am going to try to replicate the problem, using a local 8.1.2 database.
Thank you very much for your help
JCR
Michael Fuhr <mike(at)fuhr(dot)org> wrote: On Fri, Feb 10, 2006 at 08:10:36PM -0800, Jean-Christophe Roux wrote:
> here are the structures of the table involved:
I couldn't duplicate the problem in 8.1.2 or 8.0.6 with the code
you posted. I created the given tables and rules (plus guesses for
the administrators and status_list tables), then inserted several
records into topics, then inserted a few records into releases,
then inserted a few more records into topics. The topics_id_seq
sequence incremented by one each time with no gaps; that probably
means my test didn't match exactly what you're doing.
Does the topics table have any rules or triggers that you didn't
show? Could you post a minimal but complete test case, i.e, all
SQL statements that somebody could load into an empty database to
reproduce the problem? If not then it might be useful to see the
EXPLAIN ANALYZE output of a series of statements that exhibit the
unexpected behavior. What version of PostgreSQL are you running?
--
Michael Fuhr
---------------------------------
Brings words and photos together (easily) with
PhotoMail - it's free and works with Yahoo! Mail.
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Buttafuoco | 2006-02-11 14:07:29 | Re: Adding pl/perl support |
Previous Message | Pandurangan R S | 2006-02-11 13:54:58 | Re: |