agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Mr N.L. Parker <ccnp@cacofonix.utr.ac.za>
To: Postgres Database <postgres@postgres.Berkeley.EDU>
Subject: Multi-key indices in postgres.
Date: Mon, 29 Aug 1994 16:39:38 +0200 (GMT+0200)
Message-ID: <m0qf7s4-000U26C@cacofonix> (raw)

Hi

Newbie question:

Is there an easy way to create multi-key indices in Postgres - have 
browsed the manual but looks like it gets complicated ..? Maybe I am 
missing something obvious.

eg What is the POSTQUEL equivalent of the following SQL:

CREATE TABLE SP
	(Sno char(5), Pno char(5), Qty integer,
	primary key (Sno, Pno),
	foreign key (Sno) references S,
	foreign key (Pno) references P ) ;

S and P are tables which are already set up and are indexed on Sno and 
Pno respectively.

Neil

-- 
Neil Parker                              Just       *
Computer Centre, University of Transkei      visiting   *   
Pvt Bag X1 Umtata . Tel (0471)-3022461         *     this
Email: ccnp@unitrix.utr.ac.za                         *   Planet !

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



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 using the --to and --cc options:
  reply via email

  To: postgres@postgres.berkeley.edu
  Cc: ccnp@cacofonix.utr.ac.za
  Subject: Re: Multi-key indices in postgres.
  In-Reply-To: <m0qf7s4-000U26C@cacofonix>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox