pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
CHECK and IN (Sets in general) - What's the story?
2+ messages / 2 participants
[nested] [flat]

* CHECK and IN (Sets in general) - What's the story?
@ 1998-08-20 14:12  k_ogorman@kompass.ie
  0 siblings, 1 reply; 2+ messages in thread

From: k_ogorman@kompass.ie @ 1998-08-20 14:12 UTC (permalink / raw)
  To: pgsql-sql

Is there a known reason why the following definition fails
the parser at the IN keyword?:

create table kev_test ( my_tag  char check (my_tag in ('A', 'B', 'C')));

The keyword IN is defined in Postgres' dialect (or it seems to be), so I'm
at a loss as to the problem.

K.
-

--

Kevin O' Gorman - k_ogorman@kompass.ie - programmer, Kompass Internet



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [SQL] CHECK and IN (Sets in general) - What's the story?
@ 1998-08-21 07:30  Holger Mitterwald <mittehlg@coi.de>
  parent: k_ogorman@kompass.ie
  0 siblings, 0 replies; 2+ messages in thread

From: Holger Mitterwald @ 1998-08-21 07:30 UTC (permalink / raw)
  To: k_ogorman@kompass.ie; +Cc: pgsql-sql

On Thu, 20 Aug 1998 k_ogorman@kompass.ie wrote:

> Is there a known reason why the following definition fails
> the parser at the IN keyword?:
> 
> create table kev_test ( my_tag  char check (my_tag in ('A', 'B', 'C')));

It isn't this worse at all :-)

First, your syntax is not correct. 
Second, you can change the 'IN' Clause with several 'OR' clauses.
The result would look like this:

create table kev_test ( my_tag  char) constraint tester check (my_tag =
'A' OR my_tag='B' OR my_tag = 'C');

If somebody has a solution for the 'IN' construction.... mail it!

So long,
        Holger
--------------------------------------------------------------------------------
Holger Mitterwald COI-D        ####   #####    ###       CONSULTING FUER OFFICE
COI GmbH Herzogenaurach       #      #     #    #        UND INFORMATION 
Industriestrasse 1 - 3        #      #     #    #        MANAGEMENT GmbH
D-91074 Herzogenaurach         ####   #####    ###       Tel.: 09132/82-3811




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1998-08-21 07:30 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-08-20 14:12 CHECK and IN (Sets in general) - What's the story? k_ogorman@kompass.ie
1998-08-21 07:30 ` Holger Mitterwald <mittehlg@coi.de>

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