Create Assertion -- Question from a newbie

Lists: pgsql-sql
From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: SQL Postgresql List <pgsql-sql(at)postgresql(dot)org>
Subject: Create Assertion -- Question from a newbie
Date: 2006-08-27 07:19:59
Message-ID: 20060827071959.57220.qmail@web31810.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

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.


From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
Cc: SQL Postgresql List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Create Assertion -- Question from a newbie
Date: 2006-08-27 13:54:37
Message-ID: 20060827135437.GA1869@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

On Sun, Aug 27, 2006 at 00:19:59 -0700,
Richard Broersma Jr <rabroersma(at)yahoo(dot)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.


From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: SQL Postgresql List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Create Assertion -- Question from a newbie
Date: 2006-08-27 14:39:49
Message-ID: 20060827143949.16261.qmail@web31812.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

> 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.


From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Create Assertion -- Question from a newbie
Date: 2006-08-28 10:46:03
Message-ID: 20060828104603.GA2492@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

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(at)crankycanuck(dot)ca
This work was visionary and imaginative, and goes to show that visionary
and imaginative work need not end up well.
--Dennis Ritchie


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Create Assertion -- Question from a newbie
Date: 2006-08-28 14:27:31
Message-ID: 20060828142731.GF27526@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

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


From: Gregory Stark <gsstark(at)mit(dot)edu>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Create Assertion -- Question from a newbie
Date: 2006-08-30 20:47:29
Message-ID: 87ejuy6jdq.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Alvaro Herrera <alvherre(at)commandprompt(dot)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


From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Create Assertion -- Question from a newbie
Date: 2006-08-30 22:00:01
Message-ID: 20060830220001.GB10385@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

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(at)crankycanuck(dot)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


From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Create Assertion -- Question from a newbie
Date: 2006-08-31 03:08:12
Message-ID: 87sljd7gbn.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

ajs(at)crankycanuck(dot)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!"