#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Location
    Chennai, India
    Posts
    69
    Rep Power
    12

    Primay Key Constraint ??


    As per the document...

    http://www.postgresql.org/idocs/inde...ltertable.html

    ALTER TABLE distributors ADD PRIMARY KEY (dist_id);

    should work....but for me ....get this error ... ???

    hris=# alter table con5 add primary key (nis);
    ERROR: ALTER TABLE / ADD CONSTRAINT is not implemented for that constraint type.
    hris=#
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Posts
    56
    Rep Power
    12
    I've stumbled over this too -


    ALTER table distributors ADD CONSTRAINT name_of_constraint PRIMARY KEY (dist_id);
    Casuistry Agnostic
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Location
    Chennai, India
    Posts
    69
    Rep Power
    12
    Hi

    Thanks for your reply...

    However, the following still gives the same error... ??
    ALTER table distributors ADD CONSTRAINT name_of_constraint PRIMARY KEY (dist_id);
    Should we create a primary key constraint only during CREATE TABLE...??

    I'm using version 7.2.1. BTW, any method to find the version of the PostgreSQL database ??

    Thanks & Regards.
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Posts
    56
    Rep Power
    12
    Hmm.. both statements are valid. I'm at a lost as I am using 7.2.1 also.

    Just for kicks, check which version you are running -

    pg_config --version
    Casuistry Agnostic
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Location
    Chennai, India
    Posts
    69
    Rep Power
    12
    Originally posted by ultraslacker
    Just for kicks, check which version you are running -

    pg_config --version
    Hi Boss

    pg_config --version shows me ...


    PostgreSQL 7.1.3
    But, I've downloaded and installed 7.2.1. Previously, we had 7.1.3 on RH Linux 7.2.

    Any links/info about how to upgrade from 7.1.3 to 7.2.1 properly??

    I greatly appreciate you kind help.

    Thanks & Regards.

IMN logo majestic logo threadwatch logo seochat tools logo