Hi all;
The real problem with using the trigger approach is as follows:
Normally the unique constraint is handled by an index (most efficient way),
but doing so using a trigger is more likely to lose this benefit and give
you some performance problems.
IIRC, the problems with inherited keys are,
Andreas wrote:
Seastian Böck wrote:
for primary keys there is a simple (and at least working for me)
solution as long as you can use the SERIAL type for your primary
key.
[...]
Now the id column gets merged and you should have the desired
behaviour.
If you want objects.id to get referenced by othe
Seastian Böck wrote:
for primary keys there is a simple (and at least working for me)
solution as long as you can use the SERIAL type for your primary
key.
[...]
Now the id column gets merged and you should have the desired
behaviour.
If you want objects.id to get referenced by other tables you ha
Andreas wrote:
Hello list,
what about uniqueness of inherited primary keys ?
eg you have :
create table objects (
id int4,
date_created timestamp(0),
primary key (id)
);
create table persons (
firstname varchar(100),
lastname varchar(100)
) inherits (objects);
now ...
insert into object
Hello list,
what about uniqueness of inherited primary keys ?
eg you have :
create table objects (
id int4,
date_created timestamp(0),
primary key (id)
);
create table persons (
firstname varchar(100),
lastname varchar(100)
) inherits (objects);
now ...
insert into objects (id) values