why doesn't this work?

From: Ashley Clark <aclark(at)ghoti(dot)org>
To: Postgres General List <pgsql-general(at)postgresql(dot)org>
Subject: why doesn't this work?
Date: 2000-12-10 00:37:51
Message-ID: 20001209183751.A27690@ghoti.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Conceptually I don't understand why this doesn't work.

from the psql prompt:

plumbing=# begin;
BEGIN
plumbing=# insert into plan_prices
plumbing-# (plan_id, eff_date, ground, topout, final)
plumbing-# values
plumbing-# (1, '2001-01-01',1000,1000,1000);
INSERT 215620 1
plumbing=# select currval('plan_prices_id_seq');
currval
---------
11
(1 row)

plumbing=# SELECT * from plan_prices ;
id | plan_id | eff_date | ground | topout | final
----+---------+------------+---------+---------+---------
1 | 1 | 2000-01-01 | 1000.00 | 2400.00 | 1700.00
4 | 1 | 2000-06-01 | 0.00 | 0.00 | 0.00
7 | 1 | 2001-01-01 | 1000.00 | 1000.00 | 1000.00
11 | 1 | 2001-01-01 | 1000.00 | 1000.00 | 1000.00
(4 rows)

plumbing=# delete from plan_prices where id=11;
ERROR: triggered data change violation on relation "plan_prices"
plumbing=# ABORT ;
ROLLBACK

--
shaky cellar

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Peterson 2000-12-10 01:24:25 storing passwords
Previous Message Bruce Momjian 2000-12-09 23:39:14 Re: ExecRestrPos: node type 18 not supported