Thread: Create Assertion -- Question from a newbie
Sorry if my question is a little off topic. I am reading my new "SQL for Smarties" book side by side with the PostgreSQL 8.1 manual. I noticed that this particular feature is not included in PostgreSQL. Some of the achieve threads mostly discuss that this feature is currently not supported. My understanding is that Assertions place constraints upon data spanning multiple related tables. Is the Assertion feature slated to be added in the future? (Perhaps rolled up in a more generalized "TO-DO" item?) Would this feature add functionality that can not be achieved by other means? (i.e. alternative schema definitions or triggers?) Or does it merely provide a redundant means to constrain data, and thereby not warrant addition into the features of PostgreSQL? Regards, Richard Broersma Jr.
On Sun, Aug 27, 2006 at 00:19:59 -0700, Richard Broersma Jr <rabroersma@yahoo.com> wrote: > Sorry if my question is a little off topic. > > I am reading my new "SQL for Smarties" book side by side with the PostgreSQL 8.1 manual. I > noticed that this particular feature is not included in PostgreSQL. Some of the achieve threads > mostly discuss that this feature is currently not supported. My understanding is that Assertions > place constraints upon data spanning multiple related tables. > > Is the Assertion feature slated to be added in the future? (Perhaps rolled up in a more > generalized "TO-DO" item?) > > Would this feature add functionality that can not be achieved by other means? (i.e. alternative > schema definitions or triggers?) Or does it merely provide a redundant means to constrain data, > and thereby not warrant addition into the features of PostgreSQL? You can accomplish what assertions do using triggers. I think the issue is generating triggers for general assertions that don't totally suck performancewise.
> You can accomplish what assertions do using triggers. > I think the issue is generating triggers for general assertions that don't > totally suck performancewise. Ah, I see. So the points is that checking the integrity between two complete data sets can become a preformace killer. Thanks for the feed back. Regards, Richard Broersma Jr.
On Sun, Aug 27, 2006 at 07:39:49AM -0700, Richard Broersma Jr wrote: > Ah, I see. So the points is that checking the integrity between > two complete data sets can become a preformace killer. Not necessarily. More exactly, building a support system that can check such integrity in a completely general way, such that it could be used for any arbitrary data, is a hard problem that might destroy performance. It's also a pretty exotic feature. You might want to ask on the -hackers list for more detail, though. A -- Andrew Sullivan | ajs@crankycanuck.ca This work was visionary and imaginative, and goes to show that visionary and imaginative work need not end up well. --Dennis Ritchie
Andrew Sullivan wrote: > On Sun, Aug 27, 2006 at 07:39:49AM -0700, Richard Broersma Jr wrote: > > > Ah, I see. So the points is that checking the integrity between > > two complete data sets can become a preformace killer. > > Not necessarily. More exactly, building a support system that can > check such integrity in a completely general way, such that it could > be used for any arbitrary data, is a hard problem that might destroy > performance. It's also a pretty exotic feature. You might want to > ask on the -hackers list for more detail, though. Well, it's on the SQL standard, so we should look forward to implementing (some form of) it some day. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Alvaro Herrera <alvherre@commandprompt.com> writes: > Well, it's on the SQL standard, so we should look forward to > implementing (some form of) it some day. Do *any* databases implement SQL standard Assertions? -- greg
On Wed, Aug 30, 2006 at 04:47:29PM -0400, Gregory Stark wrote: > > Do *any* databases implement SQL standard Assertions? Somebody must've had an implementation, or it'd never have made it into the spec ;-) A -- Andrew Sullivan | ajs@crankycanuck.ca A certain description of men are for getting out of debt, yet are against all taxes for raising money to pay it off. --Alexander Hamilton
ajs@crankycanuck.ca (Andrew Sullivan) wrote: > On Wed, Aug 30, 2006 at 04:47:29PM -0400, Gregory Stark wrote: >> >> Do *any* databases implement SQL standard Assertions? > > Somebody must've had an implementation, or it'd never have made it > into the spec ;-) Supposedly, RDB had this feature... Of course, it disappeared into the Oracle empire... -- let name="cbbrowne" and tld="gmail.com" in String.concat "@" [name;tld];; http://linuxdatabases.info/info/slony.html Signs of a Klingon Programmer - 18. "Perhaps it IS a good day to die! I say we ship it!"