pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dirk Jagdmann <jagdmann@gmail.com>
To: Risto Tamme <risto@ektaco.ee>
Cc: pgsql-sql@postgresql.org
Subject: Re: table constraint + INSERT
Date: Thu, 18 May 2006 09:40:05 +0200
Message-ID: <5d0f60990605180040t4723b98bi54e3621285cb53aa@mail.gmail.com> (raw)
In-Reply-To: <5d0f60990605180037q5e612fdfja7df044136ac70a1@mail.gmail.com>
References: <E763584E741976409B9F835B475B00FC02DEB4@pe2850.EKTACO.local>
	<5d0f60990605180037q5e612fdfja7df044136ac70a1@mail.gmail.com>

Too bad, some code got truncated...

CREATE TABLE PART
(
  P_PARTKEY int4 NOT NULL,
  P_RETAILPRICE numeric,
  CONSTRAINT PART_PRIMARY PRIMARY KEY (P_PARTKEY),
  CONSTRAINT PART_check CHECK (P_RETAILPRICE = (90000 +
P_PARTKEY::numeric / 10 + P_PARTKEY::numeric / 100
);

and the second code should read:

create view PARTV as
select P_PARTKEY, 90000 + P_PARTKEY::numeric / 10 + P_PARTKEY::numeric
/ 100 as P_RETAILPRICE
from PART;

-- 
---> Dirk Jagdmann
----> http://cubic.org/~doj
-----> http://llg.cubic.org



view thread (3+ messages)

Message-ID: <5d0f60990605180040t4723b98bi54e3621285cb53aa@mail.gmail.com>
Permalink:  ../5d0f60990605180040t4723b98bi54e3621285cb53aa@mail.gmail.com/
Also on:    postgresql.org/message-id/5d0f60990605180040t4723b98bi54e3621285cb53aa@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jagdmann@gmail.com, risto@ektaco.ee
  Subject: Re: table constraint + INSERT
  In-Reply-To: <5d0f60990605180040t4723b98bi54e3621285cb53aa@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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