Re: *Proper* solution for 1..* relationship?
| От | Simon Riggs |
|---|---|
| Тема | Re: *Proper* solution for 1..* relationship? |
| Дата | |
| Msg-id | CA+U5nM++ECky3Sd2JmEM7CccLN=FMAxDJ2+Zk=XydxeUYHsgRA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: *Proper* solution for 1..* relationship? (Wolfgang Keller <feliphil@gmx.net>) |
| Список | pgsql-novice |
On 30 April 2013 12:56, Wolfgang Keller <feliphil@gmx.net> wrote:
>> The most straightforward way I know to enforce this is to check
>> that at least one child exists in a DEFERRED trigger on the the
>> parent. You still need to worry about concurrency issues.
>
> Imho it's absurd that I have to do this ("worry about concurrency
> issues") myself, how long - more than fourty years after the invention
> of relational databases?
>
> As a non-computer scientist by education?
>
>> One way to do that is to use only SERIALIZABLE transactions. There
>> are other ways, though they take more to describe and to implement.
>
> What still astounds me is that, again, this (correct implementation of
> 1..n relationships with n>0) is an absolutely standard issue that is as
> old as relational databases per se and NO ONE has implemented (and
> documented and tested and...) a standard solution yet?
>
> Gosh.
>
> What were all those people doing all those decades.
And this is exactly the point where people answer for themselves the question:
"Should I get involved and help change things?".
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-novice по дате отправления: