limitations of constraints, possible bugs - Mailing list pgsql-general

From craigp
Subject limitations of constraints, possible bugs
Date
Msg-id 20060816070231.46447.qmail@web53903.mail.yahoo.com
Whole thread Raw
Responses Re: limitations of constraints, possible bugs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
i'm curious about how constraints work (perhaps vs how they are supposed to
work).

for instance, if i create a domain (D) with some constraint, and create a table
with a column of type D[], will that domain constraint be enforced for each
element of the array? could i create a column constraint on an array to enforce
some kind of relationship among the elements (say, that they are sorted, or
that there are no NULL elements if/when NULL elements are supported in arrays),
or would it be necessary to create a trigger? finally, is it meaningful to have
a foreign key refer to an array column (and if so, what does it mean)?

i have noticed in the docs that there are various limitations in the current
implementation: domain constraints aren't enforced when returned from
functions, rowtype (from create table) constraints aren't enforced, constraints
can't be defined for composite types, etc. i see the first one is on the TODO
list; what about the others? finally, oracle has a %ROWTYPE attribute for
tables; has there been any consideration for adopting such a feature (it might
clarify the difference between a table/relation with its constraints, indexes,
etc and the implied type)?

are these sort of questions answered anywhere? if i do some testing, and find
something i think is a bug, should i ask about it here or just post it as bug
and let it be resolved by that process?

thanks!
--craig


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

pgsql-general by date:

Previous
From: "Harpreet Dhaliwal"
Date:
Subject: Re: [NOVICE] DB insert Error
Next
From: "Julian Scarfe"
Date:
Subject: Timezones -- what comes out does not go in?