Subject: Multi-key indices in postgres.

From: "Mr N.L. Parker" <[email-masked]>
Date: Mon, 29 Aug 1994 16:39:38 +0200 (GMT+0200)

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: [email-masked]                         *   Planet !

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email-masked]"

   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================

---

From: [email-masked] (Paul M. Aoki)
Date: Mon, 29 Aug 94 10:50:40 -0700

> missing something obvious.

no, there's no easy way.  the key data-type concatenation method 
works (it's used internally).
--
  Paul M. Aoki          |  University of California at Berkeley
  [email-masked]  |  Dept. of EECS, Computer Science Division (#1776) 
                        |  Berkeley, CA 94720-1776