From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Sharon Cowling <sharon.cowling@sslnz.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Problem with unique index
Date: Sun, 13 Jan 2002 12:50:00 -0800 (PST)
Message-ID: <20020113124559.T16954-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <200201132019.g0DKJLv15052@lambton.sslnz.com>
On Sun, 13 Jan 2002, Sharon Cowling wrote:
> CREATE RULE addperson_rule AS ON INSERT TO addperson_view DO INSTEAD(
> INSERT INTO person VALUES (new.person_id, new.firstname, new.lastname,
> new.dob, new.street, new.suburb, new.city, new.homephone,
> new.workphone, new.mobile, new.type, new.date_approved,
> new.approved_by, new.vehicle_type, new.vehicle_rego, new.notes);
I may be confused, but if you don't want to specify values for
drivers_licence and firearms_licence in the above insert, aren't you doing
to need to list the columns since notes comes after those columns?
> Table Structure:
> CREATE TABLE person(
> person_id INT NOT NULL,
> firstname VARCHAR(25) NOT NULL,
> lastname VARCHAR(25) NOT NULL,
> dob date NOT NULL,
> street VARCHAR(50) NOT NULL,
> suburb VARCHAR(50),
> city VARCHAR(50) NOT NULL,
> homephone INT,
> workphone INT,
> mobile INT,
> type VARCHAR(30) NOT NULL,
> date_approved DATE NOT NULL,
> approved_by VARCHAR(50) NOT NULL,
> vehicle_type VARCHAR(50),
> vehicle_rego VARCHAR(6),
> drivers_licence VARCHAR(10) UNIQUE,
> firearms_licence VARCHAR(20) UNIQUE,
> notes VARCHAR(80),
> PRIMARY KEY (person_id));
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: sszabo@megazone23.bigpanda.com, sharon.cowling@sslnz.com
Subject: Re: Problem with unique index
In-Reply-To: <20020113124559.T16954-100000@megazone23.bigpanda.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