pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pablo Niklas <pniklas@bigfoot.com>
To: Carolyn Lu Wong <carolyn@kss.net.au>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: RE: primary key question
Date: Tue, 25 Jul 2000 12:37:20 -0400 (ART)
Message-ID: <XFMail.20000721091912.pniklas@bigfoot.com> (raw)
In-Reply-To: <3976A9A6.55E6BE2E@kss.net.au>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

El 20-Jul-2000 Carolyn Lu Wong escribio:

> create table aaa(
>       field1  .... not null,
>       field2  ....,
>       ....,
>       primary key (field1, field2)
> );
> 
> Based on the above table definition, field2 allows null values. But
> after the table created based on the above script, field2 becomes not
> null. The only conclusion I come up with is setting the field as part of
> the primary key, PostgreSQL automatically sets the field to not null. Or
> is it something else?
> 
> Is this a feature or bug?
It's a SQL feature, because primary key must no contain null values.

Pablo Niklas
pniklas@bigfoot.com


-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQA/AwUBOXg9Mozs62hO+t8PEQIsGgCdFO5HlMTy087WsBFc3tPSGFBKGOUAni6C
2NnOSwcsnlNFrkNsPoV1N3u7
=Ex7i
-----END PGP SIGNATURE-----



view thread (4+ messages)

Message-ID: <XFMail.20000721091912.pniklas@bigfoot.com>
Permalink:  ../XFMail.20000721091912.pniklas@bigfoot.com/
Also on:    postgresql.org/message-id/XFMail.20000721091912.pniklas@bigfoot.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: pniklas@bigfoot.com, carolyn@kss.net.au
  Subject: Re: primary key question
  In-Reply-To: <XFMail.20000721091912.pniklas@bigfoot.com>
  References: <3976A9A6.55E6BE2E@kss.net.au> <XFMail.20000721091912.pniklas@bigfoot.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