Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iFjbq-0006wZ-OU for pgsql-general@arkaria.postgresql.org; Wed, 02 Oct 2019 18:44:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iFjbp-0006jB-CR for pgsql-general@arkaria.postgresql.org; Wed, 02 Oct 2019 18:44:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iFjbp-0006j2-2G for pgsql-general@lists.postgresql.org; Wed, 02 Oct 2019 18:44:21 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iFjbi-0003X2-2z for pgsql-general@lists.postgresql.org; Wed, 02 Oct 2019 18:44:20 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id D84A75F79F; Wed, 2 Oct 2019 14:44:11 -0400 (EDT) Date: Wed, 2 Oct 2019 14:44:11 -0400 From: Stephen Frost To: Matt Andrews Cc: Laurenz Albe , "pgsql-general@lists.postgresql.org" Subject: Re: Users, Roles and Connection Pooling Message-ID: <20191002184411.GK6962@tamriel.snowman.net> References: <0503910ff326d635e681849565de20db63c63eca.camel@cybertec.at> <20191002074310.GH6962@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wipJIL0eEqw62gjk" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --wipJIL0eEqw62gjk Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, (we don't top-post on these lists, fyi, please reply in-line and trim) * Matt Andrews (mattandrews@massey.com.au) wrote: > I have little experience in this area, but it seems like having a Postgres > role for every application user is the right way to do things. It=E2=80= =99s just > that it also seems really inconvenient. I agree that there are some drawbacks to it. > For example how to map an application=E2=80=99s users/people table to Pos= tgres > roles? The pg_role name field is limited to 64 bytes, you can=E2=80=99t c= reate a > foreign key to pg_role. What=E2=80=99s the answer? Use UUIDs as usernames= or > something? Yeah, it would be nice to have an answer to the FK issue when it comes to roles (and possibly other things..). The limit on length is annoying but I'm not sure that it's show-stopper. I don't think using UUIDs is a good idea, at all... > There=E2=80=99s very little out there on this topic, but surely this has = been done > before. Oh, absolutely, but with compromises, particularly around FKs and such. Thanks, Stephen --wipJIL0eEqw62gjk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJdlO/7AAoJEO1sijiDR2RVhnQP/3Mj/vtbqEyUqECQfLDgdm3c DpgolTO9OgqADsX/eDA39hzqJz0a6IR9MAwvG+vcdxXfMlKjaXPpq83o+4fDVyru IMORt7RO5FUV9ysz56rVd7Z4zmfLdESKrByn2A9y+COklMFYyGdBQtw6ZjRMmOVE zkKwBjK7tEe75c0pM9KSIQOLMar6lQaBUyxiCrIT6qx6AimSVKvSWMBY5olxuour QahcLjAgzFeedM+bvHYd4uTB8fbZPYi5Px6CyAhR8plQg3ahGCTVGVVe6MTgl3Da IiutbSSDIMyIvvRjDqRMkkIhcorMDyHNGTuarMJwlDDgfG4mEG/Uz+CEEGFkNrP8 LWXQbiAgOavx3YsgeB6vKHy9u/IS/bKHfT6gXaW70mTVEWCBQxntybiP2cJYBJFL dqEJNyxuVrD304w1yH+DSbT9tXHcbc8AdeNnYsWZFo2W24nqN4GEO9pcO5LkI4QE 1I2RVvGZNwq+7kuNEJd6dNgcrqtXS9Qtgz395e9mb48MTFpNgPZ+GUn1Cab4EehW gUNpl4LumcFQ4zQHKHwW/g7mVxOr4i5BVhIXtSCjGgLBjb4QpfXoTqCcm2gtXo/Q oX+azgLNFUVOWRHmVWmKnq30+rec4mrJocGnpQunSA74V18BoZoo6ZkM21ENIg2V v/pdT17EBfOgCEb2gRvD =J3eU -----END PGP SIGNATURE----- --wipJIL0eEqw62gjk--