Reputation:
I have this database table in postgres:
CREATE TABLE dummytable (
id bigint NOT NULL,
fieldvalue character varying(255)
)
How can i changed the datatype of the field "fieldvalue" to an endless character datatype? Is that possible?
Upvotes: 0
Views: 83
Reputation: 125454
Use the text data type
CREATE TABLE dummytable (
id bigint NOT NULL,
fieldvalue text
)
To alter an existent table
alter table dummytable
alter column fieldvalue
set data type text;
Upvotes: 1
Reputation: 2827
ALTER TABLE dummytable ALTER COLUMN fieldvalue TYPE TEXT;
For more ALTER TABLE
option see this link: PostgreSQL - Alter Table
Upvotes: 0