Re: Can arrays reference primary keys in CREATE TABLE?

Поиск
Список
Период
Сортировка
От Oleg Bartunov
Тема Re: Can arrays reference primary keys in CREATE TABLE?
Дата
Msg-id Pine.GSO.4.55.0305231051580.28360@ra.sai.msu.su
обсуждение исходный текст
Ответ на Re: Can arrays reference primary keys in CREATE TABLE?  (Jan Wieck <JanWieck@Yahoo.com>)
Ответы Re: Can arrays reference primary keys in CREATE TABLE?
Список 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@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


В списке pgsql-sql по дате отправления:

Предыдущее
От: Alexey Dashevsky
Дата:
Сообщение: Re: numeric fields and null
Следующее
От: Christoph Haller
Дата:
Сообщение: Re: see toast table