Re: Add header support to text format and matching feature

Поиск
Список
Период
Сортировка
От vignesh C
Тема Re: Add header support to text format and matching feature
Дата
Msg-id CALDaNm0zLTDKG6-85B-RKgAXmWiv8w7gDaSGKuQgiiZAS5N1Mw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add header support to text format and matching feature  (Rémi Lapeyre <remi.lapeyre@lenstra.fr>)
Ответы Re: Add header support to text format and matching feature  (Rémi Lapeyre <remi.lapeyre@lenstra.fr>)
Список pgsql-hackers
On Fri, Jul 17, 2020 at 10:18 PM Rémi Lapeyre <remi.lapeyre@lenstra.fr> wrote:
>
> >
> > I don't know how to do that with git-send-email, but you can certainly do it easy with git-format-patch and just
attachthem using your regular MUA. 
> >
> > (and while the cfbot and the archives have no problems dealing with the change in subject, it does break threading
insome other MUAs, so I would recommend not doing that and sticking to the existing subject of the thread) 
> >
>
> Thanks, here are both patches attached so cfbot can read them.

Few comments:
Few tests are failing because of hardcoded path:
+-- test header matching
+CREATE FOREIGN TABLE header_match ("1" int, foo text) SERVER file_server
+OPTIONS (format 'csv', filename
'/Users/remi/src/postgresql/contrib/file_fdw/data/list1.csv',
delimiter ',', header 'match');
+CREATE FOREIGN TABLE header_dont_match (a int, foo text) SERVER file_server
+OPTIONS (format 'csv', filename
'/Users/remi/src/postgresql/contrib/file_fdw/data/list1.csv',
delimiter ',', header 'match');  -- ERROR
Generally path is not specified like this. file_fdw test of make
check-world is failing because of this.

There is one warning present in the changes:
copy.c: In function ‘ProcessCopyOptions’:
copy.c:1208:5: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
     char    *sval = defGetString(defel);

There is space before tab in indent in the below code, check for git
diff --check.
+                       if (fldct < list_length(cstate->attnumlist))
+                               ereport(ERROR,
+
(errcode(ERRCODE_BAD_COPY_FILE_FORMAT),
+                                        errmsg("missing header")));

Regards,
Vignesh
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: vignesh C
Дата:
Сообщение: Re: Added tab completion for the missing options in copy statement
Следующее
От: Chapman Flack
Дата:
Сообщение: Re: pg_ctl behavior on Windows