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

Set NOT NULL error

From: Michael Rowan <mike(dot)rowan(at)internode(dot)on(dot)net>
To: postgresql novice <pgsql-novice(at)postgresql(dot)org>
Subject: Set NOT NULL error
Date: 2011-11-21 03:32:33
Message-ID: 60C5D86D-9476-473D-A4B2-9A33958385D8@internode.on.net (view raw or flat)
Thread:
Lists: pgsql-novice
This command run from the SQL window of pgAdmin3 results in an error:

In the table vehicle there is a column maker_id
There is no data in the table, it is newly created.

ALTER TABLE vehicle ADD CONSTRAINT maker_id SET NOT NULL;

ERROR: syntax error at or near "SET"

AKAICS thats a direct copy of the required command in the PostgreSQL 9.1 docs, so I wonder what provokes the error?


Michael Rowan
mike(dot)rowan(at)internode(dot)on(dot)net

11 Kingscote Street
ALBERTON
South Australia 5014

tel 618 8240 3993




Responses

pgsql-novice by date

Next:From: Andreas KretschmerDate: 2011-11-21 07:59:49
Subject: Re: Set NOT NULL error
Previous:From: Arvind SharmaDate: 2011-11-19 02:20:09
Subject: Re: Access to pg_hba.conf

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group