From: Rikard Pavelic <rikard.pavelic@zg.htnet.hr>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5982: recursive type crashes postgres
Date: Fri, 15 Apr 2011 23:04:03 +0200
Message-ID: <4DA8B2C3.2050904@zg.htnet.hr> (raw)
In-Reply-To: <4DA86904020000250003C8CD@gw.wicourts.gov>
References: <201104151834.p3FIYSQ0067290@wwwmaster.postgresql.org>
<BANLkTikVekidaty3_CczUKBYxhkqYiq1QA@mail.gmail.com>
<28780.1302894395@sss.pgh.pa.us>
<4DA8AAD7.9000606@zg.htnet.hr>
<4DA86904020000250003C8CD@gw.wicourts.gov>
On 15.4.2011 22:49, Kevin Grittner wrote:
> Rikard Pavelic <rikard.pavelic@zg.htnet.hr> wrote:
>> On 15.4.2011 21:06, Tom Lane wrote:
>>> The former.
>>>
>>> regression=# CREATE TYPE turtle AS
>>> (
>>> name varchar
>>> );
>>> CREATE TYPE
>>> regression=# ALTER TYPE turtle ADD ATTRIBUTE offspring turtle;
>>> ERROR: composite type turtle cannot be made a member of itself
>>> regression=#
>
>> Todo item?
>
> I haven't seen anything which seems like a reasonable use case yet,
> myself. If you were *actually* tracking turtles and their
> offspring, that would be a completely worthless data structure. Is
> there really a case where a reference to the ID of an object of like
> type isn't a better solution?
>
> -Kevin
>
I'm trying to map application and database domain as close as possible.
So it's not that I have an use case, but have a mismatch which cannot be mapped.
This feature would reduce object-relational impedance mismatch in DDD,
so I think it is worth an Todo item.
Is this design strange/stupid? Probably.
But, currently it behaves as struct. It would be nice if it behaved as class
(when attribute is nullable).
Regards,
Rikard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: rikard.pavelic@zg.htnet.hr, Kevin.Grittner@wicourts.gov, tgl@sss.pgh.pa.us, mmoncure@gmail.com
Subject: Re: BUG #5982: recursive type crashes postgres
In-Reply-To: <4DA8B2C3.2050904@zg.htnet.hr>
References: <201104151834.p3FIYSQ0067290@wwwmaster.postgresql.org> <BANLkTikVekidaty3_CczUKBYxhkqYiq1QA@mail.gmail.com> <28780.1302894395@sss.pgh.pa.us> <4DA8AAD7.9000606@zg.htnet.hr> <4DA86904020000250003C8CD@gw.wicourts.gov> <4DA8B2C3.2050904@zg.htnet.hr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox