Re: Error in Documentation? (Subqueries in CHECK Constraints / SQL92-Assertions)

Fred Toussi <[email protected]>
Newsgroups gmane.comp.java.hsqldb.user
Message-ID <1361655225.19775.140661195868309.6DC627D3@webmail.messagingengine.com>
Whatever we support will be correct according to the Standard. This
type of constraint would be enforced at statement level or at commit.

Fred

On Sat, Feb 23, 2013, at 21:13, Timmy Turner wrote:

  Yes it's a complicated matter.



If you are still accepting feature requests for this, the 2 things that
Microsoft's solutions currently don't offer are:



1. Deferring the constraint evaluation to the end of the transaction

2. Evaluating the constraint on a statement/table-level and not for
each individual row



It would be great if you could include those.
2013/2/23 Fred Toussi <[1][email protected]>

It will support a wide range of subquries but not necessarily all
possible subqueries, as a check condition must hold when referenced
tables are modified.

Fred

On Sat, Feb 23, 2013, at 20:56, Timmy Turner wrote:

  > We will probably add some support in this area later this year.



Wow, this was unexpected. Can you provide any further details on what
this might look like, or what amount of functionality you will be
trying to cover?



That would add HSQLDB to the list of currently only 2 SQL-based DBMSes
that somewhat support this (one being MS Access/JET(1) and the other MS
SQLServer(2)).



(1) [2]http://support.microsoft.com/kb/201888/en-us



(2)
[3]http://sqlblog.com/blogs/alexander_kuznetsov/archive/2009/06/25/scal
ar-udfs-wrapped-in-check-constraints-are-very-slow-and-may-fail-for-mul
tirow-updates.aspx



(Found those links
on [4]http://stackoverflow.com/questions/6368349/why-dont-dbmss-support
-assertion )
2013/2/23 Fred Toussi <[5][email protected]>

The documentation states the Standard and mentions any difference in
implementation. In this case it misses the fact that subqueries are not
yet supported in check constraints.

We will probably add some support in this area later this year.

Fred

On Sat, Feb 23, 2013, at 20:31, Timmy Turner wrote:

Hi,

on [6]http://hsqldb.org/doc/2.0/guide/databaseobjects-chapt.html#dbc_co
nstraints (or page 48 in the PDF) it says:

"A CHECK constraint consists of a <search condition> that must not be
false (can be unknown) for each row of the table. The <search
condition> can reference all the columns of the current row, and if it
contains a <subquery>, other tables and views in the database
(excluding its own table)."

Is this actually true or an error in the documentation? Trying a
subquery in a check constraint gives me a FeatureNotSupportedException.

Are there any plans to support this functionality (or Assertions in
general) in the near future?


-----------------------------------------------------------------------
-------

Everyone hates slow websites. So do we.

Make your web apps faster with AppDynamics

Download AppDynamics Lite for free today:

[7]http://p.sf.net/sfu/appdyn_d2d_feb

_______________________________________________

Hsqldb-user mailing list

[8][email protected]

[9]https://lists.sourceforge.net/lists/listinfo/hsqldb-user


  --------------------------------------------------------------------
  ----------
  Everyone hates slow websites. So do we.
  Make your web apps faster with AppDynamics
  Download AppDynamics Lite for free today:
  [10]http://p.sf.net/sfu/appdyn_d2d_feb
  _______________________________________________
  Hsqldb-user mailing list
  [11][email protected]
  [12]https://lists.sourceforge.net/lists/listinfo/hsqldb-user


-----------------------------------------------------------------------
-------

Everyone hates slow websites. So do we.

Make your web apps faster with AppDynamics

Download AppDynamics Lite for free today:

[13]http://p.sf.net/sfu/appdyn_d2d_feb

_______________________________________________

Hsqldb-user mailing list

[14][email protected]

[15]https://lists.sourceforge.net/lists/listinfo/hsqldb-user


  --------------------------------------------------------------------
  ----------
  Everyone hates slow websites. So do we.
  Make your web apps faster with AppDynamics
  Download AppDynamics Lite for free today:
  [16]http://p.sf.net/sfu/appdyn_d2d_feb
  _______________________________________________
  Hsqldb-user mailing list
  [17][email protected]
  [18]https://lists.sourceforge.net/lists/listinfo/hsqldb-user


-----------------------------------------------------------------------
-------

Everyone hates slow websites. So do we.

Make your web apps faster with AppDynamics

Download AppDynamics Lite for free today:

[19]http://p.sf.net/sfu/appdyn_d2d_feb

_______________________________________________

Hsqldb-user mailing list

[20][email protected]

[21]https://lists.sourceforge.net/lists/listinfo/hsqldb-user

References

1. mailto:[email protected]
2. http://support.microsoft.com/kb/201888/en-us
3. http://sqlblog.com/blogs/alexander_kuznetsov/archive/2009/06/25/scalar-udfs-wrapped-in-check-constraints-are-very-slow-and-may-fail-for-multirow-updates.aspx
4. http://stackoverflow.com/questions/6368349/why-dont-dbmss-support-assertion
5. mailto:[email protected]
6. http://hsqldb.org/doc/2.0/guide/databaseobjects-chapt.html#dbc_constraints
7. http://p.sf.net/sfu/appdyn_d2d_feb
8. mailto:[email protected]
9. https://lists.sourceforge.net/lists/listinfo/hsqldb-user
  10. http://p.sf.net/sfu/appdyn_d2d_feb
  11. mailto:[email protected]
  12. https://lists.sourceforge.net/lists/listinfo/hsqldb-user
  13. http://p.sf.net/sfu/appdyn_d2d_feb
  14. mailto:[email protected]
  15. https://lists.sourceforge.net/lists/listinfo/hsqldb-user
  16. http://p.sf.net/sfu/appdyn_d2d_feb
  17. mailto:[email protected]
  18. https://lists.sourceforge.net/lists/listinfo/hsqldb-user
  19. http://p.sf.net/sfu/appdyn_d2d_feb
  20. mailto:[email protected]
  21. https://lists.sourceforge.net/lists/listinfo/hsqldb-user

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

_______________________________________________
Hsqldb-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.