Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6574469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:15:56+00:00 2026-05-25T15:15:56+00:00

Excerpt fro pgsql 8.4 docs : […]a column constraint is only a notational convenience

  • 0

Excerpt fro pgsql 8.4 docs : ” […]a column constraint is only a notational convenience for use when the constraint only affects one column.”
How is this valid sql then?



DROP TABLE IF EXISTS test;
CREATE TABLE test(
id integer CONSTRAINT PK_test PRIMARY KEY  CONSTRAINT nenull NOT NULL CHECK (id3>=id2) 
--the check constraint affects two columns none of which is id
,id2 integer 
, id3 integer
);

the excerpt seems to apply only to PRIMARY KEY and FOREIGN KEY constraints which should only affect the column on the same line where the constraints are declarated as Catcall has stated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:15:57+00:00Added an answer on May 25, 2026 at 3:15 pm

    Elsewhere in the docs . . .

    We say that the first two constraints are column constraints, whereas
    the third one is a table constraint because it is written separately
    from any one column definition. Column constraints can also be written
    as table constraints, while the reverse is not necessarily possible,
    since a column constraint is supposed to refer to only the column
    it is attached to. (PostgreSQL doesn’t enforce that rule, but you
    should follow it if you want your table definitions to work with other
    database systems.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is an excerpt of code from a class I am working with in
This is an excerpt of some c++ code, that i'll have to explain in
I have this HTML structure (excerpt): <td> <select id=test1 class=pub_chooser> <option value=99>All Publications</option> <option
This is an excerpt of Stroustup's book, 3rd edition, at page 362 : In
Here's an excerpt from java.text.CharacterIterator documentation: This interface defines a protocol for bidirectional iteration
So here's an excerpt from one of my classes: [ThreadStatic] readonly static private AccountManager
This is an excerpt from AnyEvent::Intro # register a read watcher my $read_watcher; $read_watcher
In my pom.xml I have this excerpt to override lift's default mailer: <dependency> <groupId>javax.mail</groupId>
I saw this excerpt in the agile rails programming book: module StoreHelper def page_title
In a book on Core Java, I found this excerpt : Think about the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.