Re: Add --{no-,}bypassrls flags to createuser

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: nathandbossart@gmail.com
Cc: Shinya11.Kato@oss.nttdata.com, michael@paquier.xyz, przemyslaw@sztoch.pl, david.g.johnston@gmail.com, robertmhaas@gmail.com, daniel@yesql.se, pgsql-hackers@postgresql.org
Date: 2022-05-25T02:07:52Z
Lists: pgsql-hackers
At Tue, 24 May 2022 10:09:10 -0700, Nathan Bossart <nathandbossart@gmail.com> wrote in 
> We're still missing some "fancier" string patterns in the tests, but we
> might just be nitpicking at this point.

Such "fancier" strings should be properly handled by FmtId() and
appendStringLiteralConn.  If this is a privilege escalating command,
we should have ones but this is not.

> I noticed that the cfbot tests for this are failing for Windows.  I've
> looked at the relevant logs a bit, and I'm not sure what is going on.  The
> expected log messages are indeed missing, but I haven't found any clues for
> why those test cases are skipped.

createuser command complains like this.

> # Running: createuser regress_user4 -a regress_user1 -a regress_user2
> createuser: error: too many command-line arguments (first is "-a")
> hint: Try "createuser --help" for more information.

It seems like '-a' is not recognised as an option parameter.

(Fortunately, the ActiveState installer looks like having been fixed,
 but something's still wrong..)

I reproduced the same failure at my hand and identified the
cause. Windows' version of getopt_long seems to dislike that
non-optional parameters precedes options.

> createuser <user name to create> <options>

The test succeeded if I moved the <user name to create> to the end of
command line.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix output of createuser --help with --valid-until

  2. createuser: Add support for more clause types through new options

  3. createuser: Cleanup and fix internal option ordering

  4. Add REPLICATION privilege for ROLEs