From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Grzegorz Szpetkowski <gszpetkowski(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org |
Subject: | Re: 5.3.5. Foreign Keys (The SQL Language) possible enhance |
Date: | 2011-10-12 20:59:04 |
Message-ID: | 201110122059.p9CKx4K06548@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Robert Haas wrote:
> On Fri, May 6, 2011 at 9:50 PM, Grzegorz Szpetkowski
> <gszpetkowski(at)gmail(dot)com> 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.
Done with the attached patch.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachment | Content-Type | Size |
---|---|---|
/rtmp/null | text/x-diff | 660 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2011-10-12 21:21:19 | Re: non-ASCII characters in SGML documentation (and elsewhere) |
Previous Message | Robert Haas | 2011-10-12 19:34:30 | Re: Document DELETE/UPDATE command tag vs triggers |