[PATCH] COPY command's data format option allows only lowercase csv,text or binary - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject [PATCH] COPY command's data format option allows only lowercase csv,text or binary
Date
Msg-id CALj2ACXJEXnh8DogA242kdX6ChiVmq3-P5m20ouMD4XMdWDScA@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] COPY command's data format option allows only lowercase csv, text or binary  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

COPY command's FORMAT option allows only all lowercase csv, text or
binary, this is true because strcmp is being used while parsing these
values.

It would be nice if the uppercase or combination of lower and upper
case format options such as CSV, TEXT, BINARY, Csv, Text, Binary so
on. is also allowed.

To achieve this pg_strcasecmp() is used instead of strcmp.

Attached is a patch having above changes.

Request the community to review the patch, if it makes sense.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: SIGSEGV from START_REPLICATION 0/XXXXXXX in XLogSendPhysical ()at walsender.c:2762
Next
From: Amit Kapila
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions