Re: Odd "INSERT" Problems with PostgreSQL - Do YOU know? - Mailing list pgsql-general

From Tom Lane
Subject Re: Odd "INSERT" Problems with PostgreSQL - Do YOU know?
Date
Msg-id 27794.990704453@sss.pgh.pa.us
Whole thread Raw
In response to Odd "INSERT" Problems with PostgreSQL - Do YOU know?  ("Jason" <jason@op480.com>)
List pgsql-general
"Jason" <jason@op480.com> writes:
> The odd thing is, when I do these queries they do not fail, yet they do not
> insert.

Perhaps the php code is running inside a transaction block?  If so, the
added rows won't be visible to other connections until (and unless) the
transaction is committed.  The rows *would* be visible to subsequent
commands issued by that same php connection, though --- have you tried
checking that way?

> It still increases the serial primary key ("id")

This is consistent with my theory.  Sequence-object bumps are
immediately visible regardless of transaction boundaries.

            regards, tom lane

pgsql-general by date:

Previous
From: "Richard Huxton"
Date:
Subject: Re: Odd "INSERT" Problems with PostgreSQL - Do YOU know?
Next
From: Tom Lane
Date:
Subject: Re: Estimating costs (was Functional Indices)