From sharmad@im.eth.net Fri Jan 19 09:48:28 2001 Received: from im.eth.net (mail.uthplanet.com [202.9.136.18]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0J9mP092519 for ; Fri, 19 Jan 2001 04:48:28 -0500 (EST) (envelope-from sharmad@im.eth.net) Received: from SharmadNaik ([61.11.9.26]) by im.eth.net with Microsoft SMTPSVC(5.5.1877.117.11); Fri, 19 Jan 2001 15:07:50 +0530 Message-ID: <001201c081f9$87ebef00$1a090b3d@SharmadNaik> From: "Sharmad Naik" To: "PGSQL-SQL" Subject: primary key and indexing Date: Fri, 19 Jan 2001 14:51:55 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01C08227.5DB5B9E0" 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/251 X-Sequence-Number: 920 This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C08227.5DB5B9E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I m sorry If anyone has already asked this Q earlier I wanted to know=20 Q1. Whether I can have another key on which the table is indexed even thoug= h i have a primary key..Then how would the data be accessed according to pr= imary key or the indexed key of my choice or i can index as per my choice (= primary / index key)? Q2. If possible can anybody tell me how to get the script given in the e-bo= ok of Postresql be interpreted in Perl i.e=20 perl gives an error that Pg is not connected to Dbase ------=_NextPart_000_0007_01C08227.5DB5B9E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I m sorry If anyone has already asked this= Q=20 earlier
    I wanted to know
 
Q1. Whether I can have another key on whic= h the=20 table is indexed even though i have a primary key..Then how would the = data=20 be accessed according to primary key or the indexed key of my choice or i c= an=20 index as per my choice ( primary / index key)?
 
Q2. If possible can anybody tell me how to= get the=20 script given in the e-book of Postresql be interpreted in Perl i.e=20
perl <name of file>
gives an error that Pg is not connected to= =20 Dbase
------=_NextPart_000_0007_01C08227.5DB5B9E0-- From dev@archonet.com Fri Jan 19 13:05:08 2001 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