Re: Value Too long varchar(100)

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Value Too long varchar(100)
Дата
Msg-id CAKFQuwb211JjQTr-XCy9zng1auU09xp4-jGyaAToY7eZLy4i0Q@mail.gmail.com
обсуждение исходный текст
Ответ на Value Too long varchar(100)  (Rama Krishnan <raghuldrag@gmail.com>)
Ответы Re: Value Too long varchar(100)  (Stefan Knecht <knecht.stefan@gmail.com>)
Список pgsql-general


On Thu, Oct 27, 2022 at 5:02 AM Rama Krishnan <raghuldrag@gmail.com> wrote:
Hi team, 

We are getting csv file from client to upload data in my db table , one particular column I. E clinet description column contains more than 100 character  hence I am getting value too long varchar (100) so we decided to upload db only first 100 characters. How to use this thing in copy command

You cannot.  Either fix the content of the file or remove the arbitrary length limitation on the field (i.e., change the type to "text").  I suggest the later.  You may also,copy into a temporary staging table that lacks the limit, then use insert to move the transformed data (via a select query) into the production table.

David J.

В списке pgsql-general по дате отправления:

Предыдущее
От: Kristjan Mustkivi
Дата:
Сообщение: Re: Index corruption revealed after upgrade to 11.17, could date back to at least 11.12
Следующее
От: Stefan Knecht
Дата:
Сообщение: Re: Value Too long varchar(100)