This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients berker.peksag, erdnaxeli, krypten, r.david.murray, rhettinger, samwyse, serhiy.storchaka, skip.montanaro, tegdev, yoonghm
Date 2021-06-28.15:57:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1624895872.17.0.630910228859.issue23041@roundup.psfhosted.org>
In-reply-to
Content
Okay, I'll reopen this, at least for the discussion of QUOTE_NONNULL. @erdnaxeli please given an example of how PostgreSQL distinguishes between the empty string and None cases. Is it a quoted empty string vs an empty field? If so, modifying @samwyse's original example, is this what you are after?

>>> csv.register_dialect('quote_notnull', quoting=csv.QUOTE_NOTNULL)
>>> csv.writer(sys.stdout, dialect='quote_notnull').writerow(['', None, 42])
"",,"42"

? Can you modify the original two patches to restrict to QUOTE_NONNULL?
History
Date User Action Args
2021-06-28 15:57:52skip.montanarosetrecipients: + skip.montanaro, rhettinger, samwyse, r.david.murray, berker.peksag, serhiy.storchaka, krypten, yoonghm, tegdev, erdnaxeli
2021-06-28 15:57:52skip.montanarosetmessageid: <1624895872.17.0.630910228859.issue23041@roundup.psfhosted.org>
2021-06-28 15:57:52skip.montanarolinkissue23041 messages
2021-06-28 15:57:52skip.montanarocreate