Re: References not being checked while creating tables?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bas van der Linden <bas(at)mike(dot)amaze(dot)nl>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: References not being checked while creating tables?
Date: 2001-03-16 20:02:24
Message-ID: 25896.984772944@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Bas van der Linden <bas(at)mike(dot)amaze(dot)nl> writes:
> CREATE TABLE test (
> id serial
> );

> CREATE TABLE test2 (
> another_id text REFERENCES test(id)
> );

> This is accepted by the database, however, it obviously is of no use
> whatsoever as the data types are incompatible.

Yes, the type mismatch should be detected sooner. I thought we had
fixed this for 7.1, but I see it still doesn't notice the problem
until runtime. Oh well, another TODO item for 7.2 ...

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Randy Hall 2001-03-16 20:14:58 Re: pg_dump & BLOBs ?
Previous Message Laurel Williams 2001-03-16 18:06:58 installing/running ODBC