Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

[Fwd: [Fwd: named constraints]]


  • From: Merrill Oveson <merrill(at)actarg(dot)com>
  • To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
  • Subject: [Fwd: [Fwd: named constraints]]
  • Date: Mon, 25 Sep 2000 14:06:35 -0600
  • Message-id: <39CFB04B(dot)FF2E063C(at)actiontarget(dot)com>

--- Begin Message ---
  • From: Merrill Oveson <merrill(at)actiontarget(dot)com>
  • To: pgsql-general(at)postgresql(dot)org
  • Subject: [Fwd: named constraints]
  • Date: Tue, 19 Sep 2000 16:00:44 -0600
  • Message-id: <39C7E20C(dot)B2E895CE(at)actiontarget(dot)com>
--- Begin Message ---
  • From: Merrill Oveson <merrill(at)actiontarget(dot)com>
  • To: pgsql-general(at)postgres(dot)org
  • Subject: named constraints
  • Date: Tue, 19 Sep 2000 15:57:13 -0600
  • Message-id: <39C7E139(dot)85646646(at)actiontarget(dot)com>
All:

I have the following table:

create table try (
        ordnum int4 primary key,
        type char(3),
        CONSTRAINT type_check CHECK(type in ('bid', 'ord', 'rma'))
);

The named constraint works find here.

However when I do:

> psql ati -c "alter table try drop constraint type_check"

I get:ERROR:  parser: parse error at or near ""

Am I missing something here?

What I'd really like to do is have constraints that are "outside"
the table definition, that way I could add and drop constraints
without having to dump the data out, rebuild the schema
and re-import the data back in.  Is this possible?



--- End Message ---

--- End Message ---


Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group