Re: How to release SET() in PgSQL? - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: How to release SET() in PgSQL?
Date
Msg-id Pine.LNX.4.30.0102211651370.1381-100000@peter.localdomain
Whole thread Raw
In response to How to release SET() in PgSQL?  ("Andrey Y. Mosienko" <feo@ttn.ru>)
List pgsql-general
Andrey Y. Mosienko writes:

> CREATE TABLE "test" (
>     "a" SET('one','two','three')
> };

You could split that off into a separate table, e.g.,

CREATE TABLE test1 (
  id int,
  /* the rest of the columns in your "test" */
);

CREATE TABLE test2 (
  id int references test1,
  a varchar check a in ('one', 'two', 'three')
);

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: AllocSetAlloc()
Next
From: Tom Lane
Date:
Subject: Re: How to release SET() in PgSQL?