pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Extra quote_all_identifiers in _dumpOptions
4+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2019-07-08 481837783b  Remove unused C structure member
* Extra quote_all_identifiers in _dumpOptions
@ 2019-06-27 09:12  Arthur Zakirov <a.zakirov@postgrespro.ru>
  0 siblings, 1 reply; 4+ messages in thread

From: Arthur Zakirov @ 2019-06-27 09:12 UTC (permalink / raw)
  To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

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...

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

Attachments:

extra_quote_all_identifiers.patch (text/x-patch, 433B) download 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;
^ permalink raw reply [nested|flat] 4+ messages in thread

* Re: Extra quote_all_identifiers in _dumpOptions
@ 2019-07-08 23:32  Bruce Momjian <bruce@momjian.us>
  parent: Arthur Zakirov <a.zakirov@postgrespro.ru>
  0 siblings, 2 replies; 4+ messages in thread

From: Bruce Momjian @ 2019-07-08 23:32 UTC (permalink / raw)
  To: Arthur Zakirov <a.zakirov@postgrespro.ru>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

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...
> 
> 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 +





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Extra quote_all_identifiers in _dumpOptions
@ 2019-07-09 07:41  Michael Paquier <michael@paquier.xyz>
  parent: Bruce Momjian <bruce@momjian.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2019-07-09 07:41 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: Arthur Zakirov <a.zakirov@postgrespro.ru>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

On Mon, Jul 08, 2019 at 07:32:07PM -0400, Bruce Momjian wrote:
> Wow, good catch.  I thought C compilers would have reported this issue,
> but obviously not.  Patch applied to head.  Thanks.

Yes, I don't recall that gcc nor clang have a magic recipy for that.
We have a couple of other orphaned ones in the backend actually.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Extra quote_all_identifiers in _dumpOptions
@ 2019-07-09 08:10  Arthur Zakirov <a.zakirov@postgrespro.ru>
  parent: Bruce Momjian <bruce@momjian.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Arthur Zakirov @ 2019-07-09 08:10 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

On 09.07.2019 02:32, Bruce Momjian wrote:
>> 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.

Thank you, Bruce!

-- 
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2019-07-09 08:10 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27 09:12 Extra quote_all_identifiers in _dumpOptions Arthur Zakirov <a.zakirov@postgrespro.ru>
2019-07-08 23:32 ` Bruce Momjian <bruce@momjian.us>
2019-07-09 07:41   ` Michael Paquier <michael@paquier.xyz>
2019-07-09 08:10   ` Arthur Zakirov <a.zakirov@postgrespro.ru>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox