Thread: DRI in Docs?
I cannot find a discussion of the meaning and use of Declarative Referential Integrity (DRI) in the on-line docs ToC or Index. Please tell me in which chapter/section this is covered. Thanks, Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc. | Accelerator(TM) <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
On 4/29/07, Rich Shepard <rshepard@appl-ecosys.com> wrote: > I cannot find a discussion of the meaning and use of Declarative > Referential Integrity (DRI) in the on-line docs ToC or Index. Please tell me > in which chapter/section this is covered. The closest counterpart to MS SQL Server's DRI is the "references" permission: http://www.postgresql.org/docs/8.2/interactive/sql-grant.html Note, however, that PostgreSQL doesn't have column-level permissions, so this is by table only: > Currently, PostgreSQL does not support granting or revoking privileges for > individual columns of a table. One possible workaround is to create a view > having just the desired columns and then grant privileges to that view. Alexander.
On Sun, 29 Apr 2007, Alexander Staubo wrote: > The closest counterpart to MS SQL Server's DRI is the "references" > permission: > http://www.postgresql.org/docs/8.2/interactive/sql-grant.html Alexander, Thank you. I never before was aware of DRI, but Joe Celko mentions it several times in his book, "SQL Programming Style." I searched with Google and found a couple of hits that were postgres specific so I went looking in the docs to learn what it is and where it is. Couldn't find it. From your response I see that it's probably not of great importance to me in my current project. Thanks very much, Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc. | Accelerator(TM) <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
On 4/29/07, Rich Shepard <rshepard@appl-ecosys.com> wrote: > Thank you. I never before was aware of DRI, but Joe Celko mentions it > several times in his book, "SQL Programming Style." I searched with Google > and found a couple of hits that were postgres specific so I went looking in > the docs to learn what it is and where it is. Couldn't find it. We could be talking about different things, though. What Joe Celko is probably talking about is referential integrity as defined in a schema using foreign keys, as opposed to, say, triggers. Eg., create table persons (id serial, name text, ...); create table employees (person_id integer references persons (id)); PostgreSQL supports the ANSI SQL syntax for declaring foreign keys. Documentation here: http://www.postgresql.org/docs/8.2/interactive/ddl-constraints.html#DDL-CONSTRAINTS-FK But that's fundamental SQL, so this might not be what you are referring to. Alexander.
On Sun, 29 Apr 2007, Alexander Staubo wrote: > We could be talking about different things, though. What Joe Celko is > probably talking about is referential integrity as defined in a schema > using foreign keys, as opposed to, say, triggers. Eg., Alexander, I think you are correct. So much of his references are to MS SQL Server that his use of DRI is probably in that context. > PostgreSQL supports the ANSI SQL syntax for declaring foreign keys. Yup. Used 'em for years. Thanks, Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc. | Accelerator(TM) <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863