public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: jian he <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: pg_dumpall appendPQExpBuffer construct sql need an white space
Date: Wed, 15 Jan 2025 21:59:59 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CACJufxGkvhD_S9hGium08MCVqKqpreyq01NzDqajqYJ=R+xg2Q@mail.gmail.com>
References: <CACJufxGkvhD_S9hGium08MCVqKqpreyq01NzDqajqYJ=R+xg2Q@mail.gmail.com>

jian he <[email protected]> writes:
> in src/bin/pg_dump/pg_dumpall.c
>     appendPQExpBuffer(buf, " FROM pg_auth_members a "
>                       "LEFT JOIN %s ur on ur.oid = a.roleid "
>                       "LEFT JOIN %s um on um.oid = a.member "
>                       "LEFT JOIN %s ug on ug.oid = a.grantor "
>                       "WHERE NOT (ur.rolname ~ '^pg_' AND um.rolname ~ '^pg_')"
>                       "ORDER BY 1,2,4", role_catalog, role_catalog,
> role_catalog);

> here "WHERE NOT (ur.rolname ~ '^pg_' AND um.rolname ~ '^pg_')"
> need a white space at the end?

The right paren is its own token in any case, so we don't need
a space for correctness.  You could argue that it'd improve
readability, but who reads pg_dumpall's queries?

			regards, tom lane






view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pg_dumpall appendPQExpBuffer construct sql need an white space
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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