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?
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;
varchar without a length.ALTER TABLE dummytable ALTER COLUMN fieldvalue TYPE TEXT;
For more ALTER TABLE option see this link: PostgreSQL - Alter Table