gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] use of SQL command TRUNCATE


From: Ian Haywood
Subject: [Gnumed-devel] use of SQL command TRUNCATE
Date: Sun, 26 Oct 2003 19:50:40 +1100

On my setup I get:

psql:/home/ian/gnumed/gnumed/server/bootstrap/sql/gmClinicalData.sql:172: 
ERROR:  TRUNCATE cannot be used as table vaccine references this one via 
foreign key constraint $1

the code is
-- ===================================================================
-- vaccination routes
truncate vacc_route;

insert into vacc_route
        (abbreviation, description)
values
        ('i.m.', i18n('intramuscular'));

insert into vacc_route
        (abbreviation, description)
values
        ('s.c.', i18n('subcutaneous'));

Truncate doesn't appear to be allowed on tables that are referenced by another 
table.
I am using Postgresql 7.3.3

Why do we need it?

Ian

-- 
PGP public key E750652E at wwwkeys.pgp.net
9BF0 67B7 F84F F7EE 0C42  C063 28FC BC52 E750 652E

Attachment: pgpVDMImXTDNT.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]