From: | "Joel Jacobson" <joel(at)compiler(dot)org> |
---|---|
To: | "Andrew Dunstan" <andrew(at)dunslane(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: New COPY options: DELIMITER NONE and QUOTE NONE |
Date: | 2023-05-20 06:59:46 |
Message-ID: | 0400a90b-ff40-4be5-8f90-6c205c9cd99b@app.fastmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, May 19, 2023, at 19:03, Andrew Dunstan wrote:
> I think you've been a bit too cute with the grammar changes, but as you say this is a POC.
Thanks for feedback.
The approach I took for the new grammar rules was inspired by previous commits,
such as de7531a971b, which introduced support for 'FORCE QUOTE '*''. In that
case, a new separate grammar rule was crafted.
Not sure what you mean with it being "too cute", but maybe you think it's a bit
verbose with another grammar rule and it would be better to integrate it into
the existing one?
Example:
| DELIMITER opt_as (Sconst | NONE)
{
if ($3 == NONE)
$$ = makeDefElem("delimiter", (Node *) makeString("\0"), @1);
else
$$ = makeDefElem("delimiter", (Node *) makeString($3), @1);
}
/Joel
From | Date | Subject | |
---|---|---|---|
Next Message | Joel Jacobson | 2023-05-20 07:16:30 | Re: Should CSV parsing be stricter about mid-field quotes? |
Previous Message | Isaac Morland | 2023-05-20 03:08:18 | Re: PG 16 draft release notes ready |