Search Postgresql Archives

Unable to Increase the column which was part of Primary key

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am trying to increase size of the column which was/is part of the Primary.

Exiting table
CREATE TABLE test_dim_store
(
  storek integer NOT NULL DEFAULT
nextval('dim_store_storek_seq1'::regclass),
  retailerk character varying(10) NOT NULL,
  store_nbr character varying(5) NOT NULL,
  store_name character varying(25) NOT NULL,
  CONSTRAINT test_dim_store_pkey PRIMARY KEY (retailerk, store_nbr)
)
WITHOUT OIDS;

I am trying to increase  size of the column -  store_nbr (which was part of
the Primary) from Varchar(5) to varchar(10).

I tried the following :
1) drop the Primary key  - ALTER TABLE test_dim_store DROP CONSTRAINT 
test_dim_store_pkey ; 
2) Increase the size of Column - store_nbr - ALTER TABLE test_dim_store 
    ALTER COLUMN  store_nbr  TYPE varchar(10);

Error message:


ERROR:  xdb-83016: cannot alter scatter column
	   relation "test_dim_store" column "store_nbr"

********** Error **********

ERROR: xdb-83016: cannot alter scatter column
	   relation "test_dim_store" column "store_nbr"
SQL state: 42809

3) I was not able to drop the column store_nbr either.

Have anyone encountered the same issue? it is expected or it is Bug?

Can anyone please help me or suggest the best way to increase the size the
column which was/is  the part of Primary key?

Thank you in Advance.

Thanks,
Karthi




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Unable-to-Increase-the-column-which-was-part-of-Primary-key-tp5105943p5105943.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux