Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2002
    Posts
    9

    Unanswered: Need Help while creating Table

    hi ..
    i am woking in linux platform.. i am having problem in post gres sql while create table with primary constraints..

    Create Table customer(Cust_Name varchar(90) primary key,Buniess_Type varchar(90) not null)
    when this query execute on linux ..
    Table will be created and gives following message
    NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index
    i need to know how to elemenate this notice message..
    waiting for your early reply

  2. #2
    Join Date
    Dec 2002
    Posts
    15
    You can start psql with the quiet option, but this will not show any messages :

    psql -q


    But why would you not want the index creation message shown?

  3. #3
    Join Date
    Oct 2002
    Posts
    9
    Originally posted by ultraslacker
    You can start psql with the quiet option, but this will not show any messages :

    psql -q


    But why would you not want the index creation message shown?
    becuase.. company specification..

  4. #4
    Join Date
    Oct 2002
    Posts
    9
    Originally posted by manoj_cs
    becuase.. company specification..
    lhelp=# create table cust(name varchar(10) primary key);
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'cust_pkey' for table 'cust'

    i am able to create the table but still it is comming notice.. i want that message also to elemenate..
    waiting for your early reply
    manoj

  5. #5
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    20
    Originally posted by manoj_cs
    lhelp=# create table cust(name varchar(10) primary key);
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'cust_pkey' for table 'cust'

    i am able to create the table but still it is comming notice.. i want that message also to elemenate..
    waiting for your early reply
    manoj
    One way to get rid of this messag ist to define the column name as not null and without the primary key attribut and after creation of the table you put a unique index on tha key. This will do the same, but some information about your table schema.

    Bsp:
    testbed=> create table foo (name varchar(10));
    CREATE
    testbed=> create unique index foo_pkey ON foo (name);
    CREATE

    Greetings Jürgen

  6. #6
    Join Date
    Oct 2002
    Posts
    9

    Elemenate the Primary key/foriegnkey

    hi..
    i nee foreign key and primary key.. tell me how to elemenate the notice message

  7. #7
    Join Date
    Oct 2002
    Posts
    9

    Re: Elemenate the Primary key/foriegnkey

    Originally posted by manoj_cs
    hi..
    i nee foreign key and primary key.. tell me how to elemenate the notice message

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •