> 2011/10/18 Robert Haas
>
>> On Mon, Oct 17, 2011 at 7:30 PM, desmodemone
>> wrote:
>> > Seems an Oracle bug not Postgresql one!
>>
>> I don't think it's a bug for it to work. It'd probably work in
>> PostgreSQL too, if you inserted (2) first and then (1). It's just
>> that, as Tom says, if yo
Hi there,
I could workaround the behavior with deferred constraint, and
it's ok, but as I show, I have different behavior for constraint with the
same definition in two rdbms and Postgresql depends on the physical order of
row (with the same definition of constraint NOT DEFERRABLE INI
On tis, 2011-10-18 at 01:30 +0200, desmodemone wrote:
>
> alter table testup DROP CONSTRAINT testup_pkey ;
>
> alter table testup add primary key(a) DEFERRABLE INITIALLY
> IMMEDIATE ;
>
> update testup set a=a+1 ;
> UPDATE 2
>
> commit;
>
>
> Seems an Oracle bug not Postgresql one!
Or
Royce Ausburn writes:
> On 18/10/2011, at 1:00 PM, Robert Haas wrote:
>> I don't think it's a bug for it to work. It'd probably work in
>> PostgreSQL too, if you inserted (2) first and then (1). It's just
>> that, as Tom says, if you want it to be certain to work (rather than
>> depending on the
On 18/10/2011, at 1:00 PM, Robert Haas wrote:
> On Mon, Oct 17, 2011 at 7:30 PM, desmodemone wrote:
>> Seems an Oracle bug not Postgresql one!
>
> I don't think it's a bug for it to work. It'd probably work in
> PostgreSQL too, if you inserted (2) first and then (1). It's just
> that, as Tom
On Mon, Oct 17, 2011 at 7:30 PM, desmodemone wrote:
> Seems an Oracle bug not Postgresql one!
I don't think it's a bug for it to work. It'd probably work in
PostgreSQL too, if you inserted (2) first and then (1). It's just
that, as Tom says, if you want it to be certain to work (rather than
dep
Hello there
Thanks Tom!
By the way I find something very funny :
Oracle 11gR2 :
SQL> create table testup ( a number ) ;
Tabella creata.
SQL> alter table testup add primary key (a) NOT DEFERRABLE INITIALLY
IMMEDIATE ;
Tabella modificata.
SQL> insert into testup values (1 ) ;
desmodemone writes:
> create table testup ( a int ) ;
> alter table testup add primary key (a ) ;
> insert into testup values (1);
> insert into testup values (2);
> update testup set a=a+1 ;
> ERROR: duplicate key value violates unique constraint "testup_pkey"
> DETTAGLI: Key (a)=(2) alrea
Hello there,
two guys of our developer team ( Lorenzo and Federico )
have seen a strange behaviour (in 8.4 and 9.1.1 ) on update, and I think is
a bug or something really strange or I not understand correctly this
behavior .
I explain now ( begin transaction or auto commit is th