Re: Extra quote_all_identifiers in _dumpOptions - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Extra quote_all_identifiers in _dumpOptions
Date
Msg-id 20190708233207.ovbrtkjnwhcznwpc@momjian.us
Whole thread Raw
In response to Extra quote_all_identifiers in _dumpOptions  (Arthur Zakirov <a.zakirov@postgrespro.ru>)
Responses Re: Extra quote_all_identifiers in _dumpOptions  (Michael Paquier <michael@paquier.xyz>)
Re: Extra quote_all_identifiers in _dumpOptions  (Arthur Zakirov <a.zakirov@postgrespro.ru>)
List pgsql-hackers
On Thu, Jun 27, 2019 at 12:12:15PM +0300, Arthur Zakirov wrote:
> Hello hackers,
> 
> While working on pg_dump I noticed the extra quote_all_identifiers in
> _dumpOptions struct. I attached the patch.
> 
> It came from refactoring by 0eea8047bf. There is also a discussion:
> https://www.postgresql.org/message-id/CACw0%2B13ZUcXbj9GKJNGZTkym1SXhwRu28nxHoJMoX5Qwmbg_%2Bw%40mail.gmail.com
> 
> Initially the patch proposed to use quote_all_identifiers of _dumpOptions.
> But then everyone came to a decision to use global quote_all_identifiers
> from string_utils.c, because fmtId() uses it.
> 
> -- 
> Arthur Zakirov
> Postgres Professional: http://www.postgrespro.com
> Russian Postgres Company

> diff --git a/src/bin/pg_dump/pg_backup.h b/src/bin/pg_dump/pg_backup.h
> index db30b54a92..8c0cedcd98 100644
> --- a/src/bin/pg_dump/pg_backup.h
> +++ b/src/bin/pg_dump/pg_backup.h
> @@ -153,7 +153,6 @@ typedef struct _dumpOptions
>      int            no_synchronized_snapshots;
>      int            no_unlogged_table_data;
>      int            serializable_deferrable;
> -    int            quote_all_identifiers;
>      int            disable_triggers;
>      int            outputNoTablespaces;
>      int            use_setsessauth;

Wow, good catch.  I thought C compilers would have reported this issue,
but obviously not.  Patch applied to head.  Thanks.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)
Next
From: Bruce Momjian
Date:
Subject: Re: OpenSSL specific value under USE_SSL instead of USE_OPENSSL