pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedprimary key and indexing
2+ messages / 2 participants
[nested] [flat]
* primary key and indexing
@ 2001-01-19 09:21 Sharmad Naik <sharmad@im.eth.net>
2001-01-19 12:41 ` Re: primary key and indexing Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 2+ messages in thread
From: Sharmad Naik @ 2001-01-19 09:21 UTC (permalink / raw)
To: pgsql-sql
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)?
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 <name of file>
gives an error that Pg is not connected to Dbase
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: primary key and indexing
2001-01-19 09:21 primary key and indexing Sharmad Naik <sharmad@im.eth.net>
@ 2001-01-19 12:41 ` Richard Huxton <dev@archonet.com>
0 siblings, 0 replies; 2+ messages in thread
From: Richard Huxton @ 2001-01-19 12:41 UTC (permalink / raw)
To: Sharmad Naik <sharmad@im.eth.net>; pgsql-sql
Sorry for lack of proper quoting, you might find it useful to
From: "Sharmad Naik" <sharmad@im.eth.net>
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 <name of file>
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-01-19 12:41 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-19 09:21 primary key and indexing Sharmad Naik <sharmad@im.eth.net>
2001-01-19 12:41 ` Richard Huxton <dev@archonet.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox