pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: George Young <gry@ll.mit.edu>
To: pgsql-sql@postgresql.org
Subject: class as a table column?
Date: Fri, 9 Jul 1999 15:31:12 -0400 (EDT)
Message-ID: <199907091930.PAA01596@ll.mit.edu> (raw)

[libpq++ with gcc egcs-2.91.66 (egcs-1.1.2 release) on RH linux 5.1
with Postgres 6.5.]

I've seen in the manual that one can create a table with a class/table
as one of the columns, e.g.:

   --set (complex) attribute may be of the same type as the
       --relation being defined (as here) or of a different complex
       --type.  The type must exist in the "pg_type" catalog or be
       --the one currently being defined.
       --
       create table newemp (name text, manager newemp)

and I have been able to do this in psql.

But what does this really mean?  And how does one insert or extract
data from such a column?  And what is it good for?  It seems like
maybe a powerful facility, but I really don't understand it.

Is this sort-of the same as inheriting from that class? 
Does anyone have examples of its use?

Thanks,
	George

George Young,  Rm. L-204		gry@ll.mit.edu
MIT Lincoln Laboratory
244 Wood St.
Lexington, Massachusetts  02420-9108	(781) 981-2756



view thread (3+ messages)  latest in thread

Message-ID: <199907091930.PAA01596@ll.mit.edu>
Permalink:  ../199907091930.PAA01596@ll.mit.edu/
Also on:    postgresql.org/message-id/199907091930.PAA01596@ll.mit.edu

 · 

reply

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-sql@postgresql.org
  Cc: gry@ll.mit.edu
  Subject: Re: class as a table column?
  In-Reply-To: <199907091930.PAA01596@ll.mit.edu>
  References: <199907091930.PAA01596@ll.mit.edu>

* 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