From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
Cc: | Luis Sousa <llsousa(at)ualg(dot)pt>, Richard Huxton <dev(at)archonet(dot)com>, Filipe Bonjour <fbonjour(at)urbanet(dot)ch>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Can arrays reference primary keys in CREATE TABLE? |
Date: | 2003-05-23 06:55:42 |
Message-ID: | Pine.GSO.4.55.0305231051580.28360@ra.sai.msu.su |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Thu, 22 May 2003, Jan Wieck wrote:
> Luis Sousa wrote:
> > Jan Wieck wrote:
> >> You used a trigger to check something, but unless you have a full set of
> >> said triggers and they do the locking as well, you do not have
> >> referential integrity.
> >>
> >>
> >> Jan
> >>
> >>
> > I guess you are right.
> > I'll have to write a trigger for UPDATE or DELETE. How can I do the lock
> > only on that record ?
>
> That exactly is the problem with arrays here. You can't index an array
> in a way so that you can effectively select all rows who's array
> contains a particular value. Your trigger can only select all of them
there is contrib/intarray which could be used for indexed access to
array of integers. In principle, it should be not difficult to
generalize this module to support many types.
>
> Jan
>
>
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
From | Date | Subject | |
---|---|---|---|
Next Message | Christoph Haller | 2003-05-23 07:25:40 | Re: see toast table |
Previous Message | Bruce Young | 2003-05-23 06:48:31 | language "plpgsql" does not exist |