Alvin van Raalte <alvin@camberlo.demon.co.uk>

From: Alvin van Raalte <alvin@camberlo.demon.co.uk>
To: pgsql-bugs@postgreSQL.org
Date: 1999-03-04T10:58:47Z
Lists: pgsql-bugs
Sorry I have deleted the bug report template from my mail system.

System Linux(intel) 2.0.36 with Redhat 5.2
postgresql version 6.5 cvsup'ed on 3-Mar-1999.

pg_dump does not dump indices beyond the first index USING HASH.

The following is a log of a session demonstrating the problem:-

Script started on Thu Mar  4 10:42:11 1999
[alvin@camberlo java]$ ./demo.sql demo
#!/usr/bin/psql -f
\r
buffer reset(cleared)

DROP TABLE xtransactions;
DROP
CREATE TABLE xtransactions (
	seqno INTEGER DEFAULT nextval('trans_seq') PRIMARY KEY,
	accno CHAR(16) NOT NULL,
	tdate DATE NOT NULL,
	description CHAR(20),
	amount MONEY NOT NULL,
	nominal_acc INTEGER,
	memo TEXT
	CONSTRAINT tdate_range CHECK (tdate BETWEEN '01-01-1987' AND 'now'));
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 
xtransactions_pkey for table xtransactions
CREATE

CREATE INDEX xtransactions_date ON xtransactions (tdate);
CREATE
CREATE INDEX xtransactions_accno ON xtransactions USING hash (accno);
CREATE
CREATE INDEX xtransactions_nominal ON xtransactions (nominal_acc);
CREATE
CREATE INDEX xtransactions_balance ON xtransactions (accno, tdate);
CREATE

EOF
[alvin@camberlo java]$ pg_dump -t xtransactions -s demo
CREATE TABLE "xtransactions" (
	"seqno" int4 DEFAULT nextval ( 'trans_seq' ) NOT NULL,
	"accno" character(16) NOT NULL,
	"tdate" date NOT NULL,
	"description" character(20),
	"amount" money NOT NULL,
	"nominal_acc" int4,
	"memo" text,
	CONSTRAINT "tdate_range" CHECK (tdate BETWEEN '01-01-1987' AND 'now'));
CREATE UNIQUE INDEX "xtransactions_pkey" on "xtransactions" using btree 
( "seqno" "int4_ops" );
CREATE  INDEX "xtransactions_date" on "xtransactions" using btree ( 
"tdate" "date_ops" );
CREATE  INDEX "xtransactions_accno" on "xtransactions" using hash ( 
"accno" "bpchar_ops" );
[alvin@camberlo java]$ exit
Script done on Thu Mar  4 10:42:52 1999

There are five indexes on this table only three have been dumped.

Alvin.