"Joshua D. Drake" <[EMAIL PROTECTED]> wrote:

> >> Would it be worthwhile to add a switch so that the foreign key test is 
> >> only used "if" they use the switch in conjunction with a -i?
> > 
> > I wouldn't object to providing that as a (non default) option.
> 
> O.k. I will take a look at what that would take..

If we provide 'external initializer', some of your proposals can be done
through more generalized way, at least the foreign key test. It is a
replacement of the DDLAFTERs[], which is a hard-codeded list in the source
code to create primary keys. It may help other people, for example, who want
to test the performance of hash index instead of btree index (primary key).


Using it, you can use the below script or something:

$ pgbench -i -f init_with_fkey.sql
[init_with_fkey.sql]
alter table branches add primary key (bid);
...
alter table tellers add constraint tellers_bid_fkey
    foreign key (bid) references branches (bid);
...


Are you interested in this idea?

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to