| From: | "Casey T(dot) Deccio" <ctdecci(at)sandia(dot)gov> |
|---|---|
| To: | "Greg Patnude" <gpatnude(at)hotmail(dot)com> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: table constraints |
| Date: | 2005-03-02 16:14:12 |
| Message-ID: | 1109780052.11469.4.camel@boomerang.ran.sandia.gov |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Tue, 2005-03-01 at 09:56 -0700, Greg Patnude wrote:
> foreign keys and primary keys have to be defined as unique at the
> table /
> column level if you want to implement a check constraint -- your
> contrived
> example doesn't stand up all that well -- If you want to use
> constraints --
> then your database schema should conform to traditional RDBMS theory
> and
> data normalization by having primary and foreign keys instead of just
> trying to create arbitrary contraints on a non-normalized schema and
> implement constraints as a user-defined function...
>
You are correct. I did not take the time to write in these constraints
in the contrived example because I was rapidly trying to put together
something that would simply illustrate the problem. They were/are in
place in my actual schema. Thanks,
Casey
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bret Hughes | 2005-03-02 16:25:17 | definative way to place secs from epoc into timestamp column |
| Previous Message | Scott Marlowe | 2005-03-02 15:00:14 | Re: Postgres performance |