Re: [BUGS] BUG #5982: recursive type crashes postgres

2011-04-15 Thread Andrew Chernow
On 4/15/2011 6:14 PM, Kevin Grittner wrote: Merlin Moncure wrote: Consider we also have to send data to the database. I can recursively wrap up data in the client using libpqtypes, fire it to a receiving function which unnests it and processes it. This is a couple of orders of magnitude fast

Re: [BUGS] BUG #5982: recursive type crashes postgres

2011-04-15 Thread Kevin Grittner
Merlin Moncure wrote: > Consider we also have to send data to the database. I can > recursively wrap up data in the client using libpqtypes, fire it > to a receiving function which unnests it and processes it. This > is a couple of orders of magnitude faster than streaming it in > over multipl

Re: [BUGS] BUG #5982: recursive type crashes postgres

2011-04-15 Thread Merlin Moncure
On Fri, Apr 15, 2011 at 4:27 PM, Kevin Grittner wrote: > Merlin Moncure wrote: > >> There are lots of use cases for this.  I use composite types to >> marshal data to the client all the time, and recursive structures >> are fairly common in many classic problems.  Recursive composites >> fit the

Re: [BUGS] BUG #5982: recursive type crashes postgres

2011-04-15 Thread Kevin Grittner
Merlin Moncure wrote: > There are lots of use cases for this. I use composite types to > marshal data to the client all the time, and recursive structures > are fairly common in many classic problems. Recursive composites > fit the bill perfectly. I'm trying to get my head around why SQL com

Re: [BUGS] BUG #5982: recursive type crashes postgres

2011-04-15 Thread John R Pierce
On 04/15/11 2:04 PM, Rikard Pavelic wrote: This feature would reduce object-relational impedance mismatch in DDD, objects aren't relational.deal with it. OOPS may be a reasonable methodology for coding, however its purely hierarchical, and doesn't map at all well to relational calculus.

Re: [BUGS] BUG #5982: recursive type crashes postgres

2011-04-15 Thread Merlin Moncure
On Fri, Apr 15, 2011 at 3:49 PM, Kevin Grittner wrote: > 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

Re: [BUGS] BUG #5982: recursive type crashes postgres

2011-04-15 Thread Rikard Pavelic
On 15.4.2011 22:49, Kevin Grittner wrote: > Rikard Pavelic 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: composit

Re: [BUGS] BUG #5982: recursive type crashes postgres

2011-04-15 Thread Kevin Grittner
Rikard Pavelic 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 >> reg

Re: [BUGS] BUG #5982: recursive type crashes postgres

2011-04-15 Thread Rikard Pavelic
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=# > >

Re: [BUGS] BUG #5982: recursive type crashes postgres

2011-04-15 Thread Tom Lane
Merlin Moncure writes: > On Fri, Apr 15, 2011 at 1:34 PM, Rikard Pavelic > wrote: >> CREATE TYPE turtle AS >> ( >>name varchar >> ); >> ALTER TYPE turtle ADD ATTRIBUTE offspring turtle; > This is a duplicate: see Mar 28 thread 'Recursive containment of > composite types'. Was it decided

Re: [BUGS] BUG #5982: recursive type crashes postgres

2011-04-15 Thread Merlin Moncure
On Fri, Apr 15, 2011 at 1:34 PM, Rikard Pavelic wrote: > > The following bug has been logged online: > > Bug reference:      5982 > Logged by:          Rikard Pavelic > Email address:      rikard.pave...@zg.htnet.hr > PostgreSQL version: 9.1.alpha5 > Operating system:   Windows XP SP3 > Descriptio

[BUGS] BUG #5982: recursive type crashes postgres

2011-04-15 Thread Rikard Pavelic
The following bug has been logged online: Bug reference: 5982 Logged by: Rikard Pavelic Email address: rikard.pave...@zg.htnet.hr PostgreSQL version: 9.1.alpha5 Operating system: Windows XP SP3 Description:recursive type crashes postgres Details: CREATE TYPE turtle