FAQ
I have a database in a suitable format to use COPY TO to import. As it
contains 4million records I have dropped both the primary key (because it
creates an index), and the referential integrity triggers. I do this by
just creating the tables without primary keys or triggers. The problem is
that although I can happily now import the data in a very quick time, (<2
hrs) I now need to read the primary key and the referential integrity
triggers.

This is the table I use as I need to import data...
create table discid (
discID varchar(8),
CDID integer not null
)

This is what I really need as a table....
create table discid (
discID varchar(8),
CDID integer not null REFERENCES cds (cdid),
PRIMARY KEY (discID)
)

Does anyone know how to create a trigger that is the same as that created
by postgres to enforce referential integrity? and put an index on CDID
later is not the same as having an indexed primary key, hoe can I do that?

Many thanks in advance.

Tom Larard

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedMar 1, '01 at 8:09p
activeMar 1, '01 at 8:09p
posts1
users1
websitepostgresql.org
irc#postgresql

1 user in discussion

Tom Larard: 1 post

People

Translate

site design / logo © 2023 Grokbase