Received: from www-uk-05.digiserve.com ([195.172.23.63]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0JD58006453 for ; Fri, 19 Jan 2001 08:05:08 -0500 (EST) (envelope-from dev@archonet.com) Received: from mainbox.archonet.com (mwynhau.demon.co.uk [193.237.186.96]) by www-uk-05.digiserve.com (8.9.1/8.9.1) with ESMTP id NAA19360; Fri, 19 Jan 2001 13:05:03 GMT Received: from client (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with SMTP id 9D94F2A391; Fri, 19 Jan 2001 12:41:24 +0000 (GMT) Message-ID: <006401c08215$21eedc00$1001a8c0@archonet.com> From: "Richard Huxton" To: "Sharmad Naik" , "PGSQL-SQL" References: <001201c081f9$87ebef00$1a090b3d@SharmadNaik> Subject: Re: primary key and indexing Date: Fri, 19 Jan 2001 12:41:21 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200101/257 X-Sequence-Number: 926 Sorry for lack of proper quoting, you might find it useful to From: "Sharmad Naik" I m sorry If anyone has already asked this Q earlier I wanted to know Q1. Whether I can have another key on which the table is indexed even though i have a primary key..Then how would the data be accessed according to primary key or the indexed key of my choice or i can index as per my choice ( primary / index key)? You can create as many indices as you like. Type "\h create index" in psql for details, but basically: CREATE INDEX indexname ON table (columnlist) PostgreSQL will use whichever index it thinks is the most useful. Remember to vacuum analyze to update table statistics. Q2. If possible can anybody tell me how to get the script given in the e-book of Postresql be interpreted in Perl i.e perl gives an error that Pg is not connected to Dbase Don't know the script you're talking about. Check the settings in the connect command. Try "perldoc Pg" for information on how the Pg module works. - Richard Huxton