Unix Technical Forum

subqueries in check

This is a discussion on subqueries in check within the pgsql Hackers forums, part of the PostgreSQL category; --> Hi, i was looking at the unsuported features in the RC4 docs and found this: F671| Enhanced integrity management| ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 03:13 AM
Jaime Casanova
 
Posts: n/a
Default subqueries in check

Hi,

i was looking at the unsuported features in the RC4
docs and found this:

F671| Enhanced integrity management| Subqueries in
CHECK| intentionally omitted

Why is it *intentionally omitted*?
Is it to hard? or has some side-effects?

just a question!

regards,
Jaime Casanova

__________________________________________________ _______
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 03:14 AM
Alvaro Herrera
 
Posts: n/a
Default Re: subqueries in check

On Fri, Jan 07, 2005 at 11:06:58PM -0600, Jaime Casanova wrote:

Jaime,

> i was looking at the unsuported features in the RC4
> docs and found this:
>
> F671| Enhanced integrity management| Subqueries in CHECK| intentionally omitted
>
> Why is it *intentionally omitted*?
> Is it to hard? or has some side-effects?


Because it's too expensive to check. If you have a CHECK using a SELECT
against a second table, you should re-verify the SELECT every time the
second table suffers an UPDATE, INSERT or DELETE.

The user can replace the CHECK with a foreign key or a trigger, so there
is no loss of functionality.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"No single strategy is always right (Unless the boss says so)"
(Larry Wall)

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:47 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com