Bug in pgadmin III v 1.12.2
Bug in pgadmin III v 1.12.2
От:
Dan S <strd911@gmail.com>
Дата:
Hi !
I'm running pgadmin v. 1.12.2 on winxp and postgres "PostgreSQL 9.0.2, compiled by Visual C++ build 1500, 32-bit".
When selecting a table in the tree-navigator to the left the table definition and its triggers appears to the right.
However the trigger definition doesn't appear to be right ( a constraint trigger appears as an ordinary trigger ).
To reproduce:
create the table and trigger below then refresh the table definition in pgadmin and look at the trigger.
It is not shown as a constraint trigger !
create table tst (txn_id int primary key, amount numeric(15,2));
create or replace function def_constr_tst_chk_balance()
returns trigger as
$$
declare
v_amount numeric(15,2);
begin
if (tg_op='INSERT') then
select sum(amount)
into v_amount
from tst;
if (v_amount<>0) then
raise exception 'error: sum does not balance';
end if;
return new;
end if;
raise exception 'only allowed to insert';
end;
$$
language plpgsql;
create constraint trigger tst_constraint
after insert or update or delete
on tst
deferrable initially deferred
for each row
execute procedure def_constr_tst_chk_balance();
-- should succeed on commit
begin transaction;
insert into tst values(1,100);
insert into tst values(2,-100);
commit transaction;
-- should fail on commit
begin transaction;
insert into tst values(3,100);
insert into tst values(4,-110);
commit transaction;
Best Regards
Dan S
Re: Bug in pgadmin III v 1.12.2
От:
Guillaume Lelarge <guillaume@lelarge.info>
Дата:
Le 13/03/2011 10:35, Dan S a écrit : > Hi ! > > I'm running pgadmin v. 1.12.2 on winxp and postgres "PostgreSQL 9.0.2, > compiled by Visual C++ build 1500, 32-bit". > > When selecting a table in the tree-navigator to the left the table > definition and its triggers appears to the right. > However the trigger definition doesn't appear to be right ( a constraint > trigger appears as an ordinary trigger ). > > To reproduce: > > create the table and trigger below then refresh the table definition in > pgadmin and look at the trigger. > It is not shown as a constraint trigger ! > Thanks for reporting this. It seems pgAdmin doesn't know anything about constraint trigger. This is something we'll have to add in a future release. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
Re: Bug in pgadmin III v 1.12.2
От:
Guillaume Lelarge <guillaume@lelarge.info>
Дата:
Le 13/03/2011 10:54, Guillaume Lelarge a écrit : > Le 13/03/2011 10:35, Dan S a écrit : >> Hi ! >> >> I'm running pgadmin v. 1.12.2 on winxp and postgres "PostgreSQL 9.0.2, >> compiled by Visual C++ build 1500, 32-bit". >> >> When selecting a table in the tree-navigator to the left the table >> definition and its triggers appears to the right. >> However the trigger definition doesn't appear to be right ( a constraint >> trigger appears as an ordinary trigger ). >> >> To reproduce: >> >> create the table and trigger below then refresh the table definition in >> pgadmin and look at the trigger. >> It is not shown as a constraint trigger ! >> > > Thanks for reporting this. It seems pgAdmin doesn't know anything about > constraint trigger. This is something we'll have to add in a future release. > FYI, I just pushed a patch that implements that. Will be available in the next release of pgAdmin. Thanks again for letting us know. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
Re: Bug in pgadmin III v 1.12.2
От:
Dan S <strd911@gmail.com>
Дата:
Thanks !
That will be nice to have !
Do you think the new release of pgAdmin will be ready and packaged when postgres 9.1 will be released ?
Best Regards
Dan
That will be nice to have !
Do you think the new release of pgAdmin will be ready and packaged when postgres 9.1 will be released ?
Best Regards
Dan
2011/3/24 Guillaume Lelarge <guillaume@lelarge.info>
Le 13/03/2011 10:54, Guillaume Lelarge a écrit :FYI, I just pushed a patch that implements that. Will be available in> Le 13/03/2011 10:35, Dan S a écrit :
>> Hi !
>>
>> I'm running pgadmin v. 1.12.2 on winxp and postgres "PostgreSQL 9.0.2,
>> compiled by Visual C++ build 1500, 32-bit".
>>
>> When selecting a table in the tree-navigator to the left the table
>> definition and its triggers appears to the right.
>> However the trigger definition doesn't appear to be right ( a constraint
>> trigger appears as an ordinary trigger ).
>>
>> To reproduce:
>>
>> create the table and trigger below then refresh the table definition in
>> pgadmin and look at the trigger.
>> It is not shown as a constraint trigger !
>>
>
> Thanks for reporting this. It seems pgAdmin doesn't know anything about
> constraint trigger. This is something we'll have to add in a future release.
>
the next release of pgAdmin.
Thanks again for letting us know.
Re: Bug in pgadmin III v 1.12.2
От:
Guillaume Lelarge <guillaume@lelarge.info>
Дата:
Le 25/03/2011 09:28, Dan S a écrit : > Thanks ! > That will be nice to have ! > > Do you think the new release of pgAdmin will be ready and packaged when > postgres 9.1 will be released ? > That's what we usually do, yes. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com