Suggestion on column cast automatically to data type

From: postgann2020 s <postgann2020(at)gmail(dot)com>
To: pgpool-general(at)pgpool(dot)net, pgsql-admin(at)postgresql(dot)org
Subject: Suggestion on column cast automatically to data type
Date: 2020-05-21 14:37:30
Message-ID: CANynezOJUq=7E_4+s9p4p8qHxi=-2APtijgsNZWUYXGXw+nP5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Team,
Thanks for your support.

Could you please suggest on below query.

We are trying to changing the data type of the column, but for every time
triggering "column "parental_path" cannot be cast automatically to type
tsvector".

ALTER TABLE SCHEMA.TABLE ALTER COLUMN COLUMN_NAME TYPE tsvector;

ERROR: column "parental_path" cannot be cast automatically to type tsvector
HINT: You might need to specify "USING parental_path::tsvector".

Q). Are we have any automatically changing mechanism for this type of
conversion?.

>>>>>>>>>>>>>

Even after changing, getting below error.

ALTER TABLE SCHEMA.TABLE ALTER COLUMN COLUMN_NAME TYPE tsvector;
ERROR: word is too long (2087 bytes, max 2046 bytes)

Q)Suggest, how to avoid these situations?.

Thanks for your support.

Regards,
PostgAnn.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Adrian Klaver 2020-05-21 14:41:37 Re: Suggestion on table analyze
Previous Message David G. Johnston 2020-05-21 14:36:39 Re: Suggestion on index creation for TEXT data field