On Sun, 5 Aug 2001, Allan Engelhardt wrote:
> test=# create table baz(bar integer, constraint fk_bar foreign key (bar) references foo(id));
> NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
> CREATE
>
> but this is not exactly what I want: I need to ensure that baz.bar is
> a bar and not just any foo.
>
Not that this is related to what you asked about precisely (I saw the
response you made), but the query above also doesn't do what you think
it does right now. It currently makes a reference to only foo, not
any subchildren of foo.