Re: 5.3.5. Foreign Keys (The SQL Language) possible enhance

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: 5.3.5. Foreign Keys (The SQL Language) possible enhance
Дата
Msg-id
201109120209.p8C29kF13404@momjian.us
Ответ на
Список
Дерево обсуждения
5.3.5. Foreign Keys (The SQL Language) possible enhance Grzegorz Szpetkowski <gszpetkowski@gmail.com>
Re: 5.3.5. Foreign Keys (The SQL Language) possible enhance Robert Haas <robertmhaas@gmail.com>
Re: 5.3.5. Foreign Keys (The SQL Language) possible enhance Bruce Momjian <bruce@momjian.us>
Re: 5.3.5. Foreign Keys (The SQL Language) possible enhance Robert Haas <robertmhaas@gmail.com>
Re: 5.3.5. Foreign Keys (The SQL Language) possible enhance Bruce Momjian <bruce@momjian.us>
Robert Haas wrote:
> On Fri, May 6, 2011 at 9:50 PM, Grzegorz Szpetkowski
>  wrote:
> > I have some remark about
> >
> > "Now it is impossible to create orders with product_no entries that do
> > not appear in the products table."
> >
> > http://www.postgresql.org/docs/9.0/static/ddl-constraints.html#DDL-CONSTRAINTS-FK
> [...]
> >
> > There is still possibility to add product_no (exactly NULL) value,
> > which does not appear (cannot because of primary key nature) in
> > products table. To get "full solution" you need create orders table as
> >
> > CREATE TABLE orders (
> > ? ?order_id integer PRIMARY KEY,
> > ? ?product_no integer REFERENCES products (product_no) NOT NULL,
> > ? ?quantity integer
> > );
> 
> I don't think we should change the example, but we could probably
> clarify the wording.

Any ideas on how to clarify the wording?

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +
В списке pgsql-docs по дате отправления
От: Bruce Momjian
Дата:
От: Ray Stell
Дата:
Сообщение: create foreign table
FAQ