Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DAA41650030 for ; Wed, 23 Jul 2008 06:23:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 58502-06 for ; Wed, 23 Jul 2008 06:23:42 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171]) by postgresql.org (Postfix) with ESMTP id 4770D64FF7E for ; Wed, 23 Jul 2008 06:23:44 -0300 (ADT) Received: by wf-out-1314.google.com with SMTP id 25so1777921wfc.28 for ; Wed, 23 Jul 2008 02:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=hHw2TTUzCY5g79nv4nZ6/pH2tO5UAYWoNxrny3dA52c=; b=I3aT8jC1SbQ6TouItJRKO5M5RfYyyoArG3aZmxYH7Kg8dXhC6PNhzjyzTXPn4orSo9 au872NYbZ1YUpfiel6LyKQmZ6bxKl0i14mMOG4F5lFSP+U+qRtOrotTAHnFGOBzOx30N xeyY2QBI2q3bZqD0U48jhcYDAwloUf1Lw/LxE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=qnoqQFVtFsgIAOOQJJBSIdpKAvynpByBI353CdNt63rjhf75oRIKUfk2fl3IHq+w3H +bMSpVEQDyoPllu7svKAYWP1DNXvbqqvv2NeXlYsnPArFIsFBExsw5KZ7PK+tgFBjJqO Xo5tk6I/0zlk994kSC4tzJ2zgJ5C0x/+KmIKY= Received: by 10.143.3.4 with SMTP id f4mr2257960wfi.233.1216805021600; Wed, 23 Jul 2008 02:23:41 -0700 (PDT) Received: by 10.143.18.15 with HTTP; Wed, 23 Jul 2008 02:23:41 -0700 (PDT) Message-ID: Date: Wed, 23 Jul 2008 11:23:41 +0200 From: "Gibson Chimhamhiwa" To: pgsql-admin@postgresql.org Subject: Re: Welcome to the pgsql-admin list! In-Reply-To: <20080723091232.AEE7A37B4AB@mx3.hub.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_72303_13835805.1216805021511" References: <20080723091232.AEE7A37B4AB@mx3.hub.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200807/189 X-Sequence-Number: 29799 ------=_Part_72303_13835805.1216805021511 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All, I have a simple table below and I want to be able to traverse it using SQL. Can somebody please advise me how I can do this in postgreSQL. CREATE TABLE grouping ( grouping_id int4 NOT NULL, version int4, parent_grouping_id int4, topic_topic_id int4, CONSTRAINT grouping_pkey PRIMARY KEY (grouping_id), CONSTRAINT fk1e2e9d036852722d FOREIGN KEY (topic_topic_id) REFERENCES topic (topic_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT fk1e2e9d03a1bfbfe FOREIGN KEY (topic_topic_id) REFERENCES topic (topic_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT fk1e2e9d03cdaf7222 FOREIGN KEY (parent_grouping_id) REFERENCES grouping (grouping_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) WITHOUT OIDS; ALTER TABLE grouping OWNER TO napdba; Thanks In Advance. Gibson. On Wed, Jul 23, 2008 at 11:12 AM, wrote: > Welcome to the pgsql-admin mailing list! > Your password at postgresql.org is > > QiFiDx > > To leave this mailing list, send the following command in the body > of a message to majordomo@postgresql.org: > > approve QiFiDx unsubscribe pgsql-admin gchimhamhiwa@gmail.com > > This command will work even if your address changes. For that reason, > among others, it is important that you keep a copy of this message. > > To post a message to the mailing list, send it to > pgsql-admin@postgresql.org > > If you need help or have questions about the mailing list, please > contact the people who manage the list by sending a message to > pgsql-admin-owner@postgresql.org > > You can manage your subscription by visiting the following WWW location: > < > http://mail.postgresql.org/mj/mj_wwwusr/domain=postgresql.org/gchimhamhiwa%40gmail.com > > > > > Put the text of the welcome message here. > > -- Gibson Chimhamhiwa CSIR - Meraka Institute P O Box 395, Pretoria 0001 South Africa www.csir.co.za / www.meraka.org.za Office: +27 12 841 2758 Mobile: +27 78 447 2879 Fax: +27 12 841 4720 E-mail:gchimhamhiwa@gmail.co.za ------=_Part_72303_13835805.1216805021511 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi All,

I have a simple table below and I want to be able to traverse it using SQL. Can somebody please advise me how I can do this in postgreSQL.

CREATE TABLE grouping
(
  grouping_id int4 NOT NULL,
  version int4,
  parent_grouping_id int4,
  topic_topic_id int4,
  CONSTRAINT grouping_pkey PRIMARY KEY (grouping_id),
  CONSTRAINT fk1e2e9d036852722d FOREIGN KEY (topic_topic_id)
      REFERENCES topic (topic_id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT fk1e2e9d03a1bfbfe FOREIGN KEY (topic_topic_id)
      REFERENCES topic (topic_id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT fk1e2e9d03cdaf7222 FOREIGN KEY (parent_grouping_id)
      REFERENCES grouping (grouping_id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITHOUT OIDS;
ALTER TABLE grouping OWNER TO napdba;

Thanks In Advance.

Gibson.

On Wed, Jul 23, 2008 at 11:12 AM, <pgsql-admin-owner@postgresql.org> wrote:
Welcome to the pgsql-admin mailing list!
Your password at postgresql.org is

QiFiDx

To leave this mailing list, send the following command in the body
of a message to majordomo@postgresql.org:

approve QiFiDx unsubscribe pgsql-admin gchimhamhiwa@gmail.com

This command will work even if your address changes.  For that reason,
among others, it is important that you keep a copy of this message.

To post a message to the mailing list, send it to
 pgsql-admin@postgresql.org

If you need help or have questions about the mailing list, please
contact the people who manage the list by sending a message to
 pgsql-admin-owner@postgresql.org

You can manage your subscription by visiting the following WWW location:
 <http://mail.postgresql.org/mj/mj_wwwusr/domain=postgresql.org/gchimhamhiwa%40gmail.com>


 Put the text of the welcome message here.




--
Gibson Chimhamhiwa
CSIR - Meraka Institute
P O Box 395, Pretoria 0001
South Africa
www.csir.co.za / www.meraka.org.za
Office: +27 12 841 2758
Mobile: +27 78 447 2879
Fax: +27 12 841 4720
E-mail:gchimhamhiwa@gmail.co.za
------=_Part_72303_13835805.1216805021511--