Self referencing composite datatype

From: Sameer Thakur <samthakur74(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Self referencing composite datatype
Date: 2013-08-07 11:57:13
Message-ID: CABzZFEv+Q2kxrSNLs9xsyQQybgd3qomLdiU4eMxaU9u5GO9B_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,
I wanted to create a composite datatype to represent a Node. So it would
have a few attributes and an array of type Node which is the children of
this node.
create type Node as (r integer, s integer, children Node []);
But i get error type Node[] does not exist. I understand that Node is not
defined hence the error.
But how do i get around this problem?

regards
Sameer

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Travers 2013-08-07 12:07:58 Re: Self referencing composite datatype
Previous Message Sameer Thakur 2013-08-07 11:49:24 Re: Populating array of composite datatype