[GENERAL] COPY: row is too big

2017-01-02 Thread vod vos
Hi everyone, My postgresql is 9.61. When I copy data from csv file, a very long values for many columns (about 1100 columns). The errors appears: ERROR: row is too big: size 11808, maximum size 8160CONTEXT: COPY rius, line 2 rius is the table. I have searched the mailing lis

Re: [GENERAL] COPY: row is too big

2017-01-02 Thread vod vos
The most of the data type are text or varhcar, and I use: COPY rius FROM "/var/www/test/aa.csv" WITH DELIMITER ';' ; And some the values in the csv file contain nulls, do this null values matter? Thanks. On 星期一, 02 一月 2017 03:11:14 -0800 vod vos <

Re: [GENERAL] COPY: row is too big

2017-01-02 Thread vod vos
-0800 Tom Lane <t...@sss.pgh.pa.us> wrote ---- vod vos <vod...@zoho.com> writes: > When I copy data from csv file, a very long values for many columns (about 1100 columns). The errors appears: > ERROR: row is too big: size 11808, maximum size 8160 You need to

Re: [GENERAL] COPY: row is too big

2017-01-04 Thread vod vos
Now I am confused about I can create 1100 columns in a table in postgresql, but I can't copy 1100 values into the table. And I really dont want to split the csv file to pieces to avoid mistakes after this action. I create a table with 1100 columns with data type of varchar, and hope the COPY

Re: [GENERAL] COPY: row is too big

2017-01-04 Thread vod vos
OK, maybe the final solution is to split it into half. On 星期三, 04 一月 2017 06:53:31 -0800 Adrian Klaver <adrian.kla...@aklaver.com> wrote On 01/04/2017 05:00 AM, vod vos wrote: > Now I am confused about I can create 1100 columns in a table in > postgresql, but I can

Re: [GENERAL] COPY: row is too big

2017-01-05 Thread vod vos
I finally figured it out as follows: 1. modified the corresponding data type of the columns to the csv file 2. if null values existed, defined the data type to varchar. The null values cause problem too. so 1100 culumns work well now. This problem wasted me three days. I have lots of

[GENERAL] How to define the limit length for numeric type?

2017-03-11 Thread vod vos
Hi everyone, How to define the exact limit length of numeric type? For example, CREATE TABLE test (id serial, goose numeric(4,1)); 300.2 and 30.2 can be inserted into COLUMN goose, but I want 30.2 or 3.2 can not be inserted, how to do this? Thank you. -- Sent via pgsql-general mailing l

Re: [GENERAL] How to define the limit length for numeric type?

2017-03-11 Thread vod vos
length of the insert value, you can just type format like 59.22, only four digits length. Thank you. On 星期六, 11 三月 2017 22:25:19 -0800 Pavel Stehule wrote > > > 2017-03-12 7:14 GMT+01:00 vod vos : > > Hi everyone, > > How to define the exact limit

Re: [GENERAL] How to define the limit length for numeric type?

2017-03-12 Thread vod vos
; > From: pgsql-general-ow...@postgresql.org > > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of vod vos > > Sent: Sonntag, 12. März 2017 08:01 > > To: Pavel Stehule > > Cc: pgsql-general > > Subject: Re: [GENERAL] How to define the limit length f

Re: [GENERAL] How to define the limit length for numeric type?

2017-03-13 Thread vod vos
the job, but are there any simpler ways to do it in postgresql? On 星期日, 12 三月 2017 14:28:53 -0700 rob stone wrote > Hello, > > On Sat, 2017-03-11 at 22:14 -0800, vod vos wrote: > > Hi everyone, > > > > How to define the exact limit length o