pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michiel Lange <michiel@minas.demon.nl>
Cc: pgsql-hackers@postgreSQL.org, Peter Eisentraut <peter_e@gmx.net>
Subject: Re: [ADMIN] Cannot connect to the database (PG 7.3)
Date: Tue, 28 Jan 2003 17:04:22 -0500
Message-ID: <3032.1043791462@sss.pgh.pa.us> (raw)
In-Reply-To: <1656.1043790202@sss.pgh.pa.us>
References: <18236.1043628134@sss.pgh.pa.us>
	<5.1.0.14.0.20030127011523.00b33440@192.168.1.3>
	<5.1.0.14.0.20030127011523.00b33440@192.168.1.3>
	<5.1.0.14.0.20030128221603.00b33d50@192.168.1.3>
	<1656.1043790202@sss.pgh.pa.us>

I wrote:
> Michiel Lange <michiel@minas.demon.nl> writes:
>> It is, somehow, not possible to connect as a user which name is completely 
>> numeric.

> I muttered "nonsense!" to myself, but darned if you're not right:

> regression=# create user "12345";
> CREATE USER
> regression=# \q
> $ psql -U 12345 regression
> psql: FATAL:  SET SESSION AUTHORIZATION: permission denied

> Will look into it.

After some looking, it appears the culprit is
assign_session_authorization() in commands/variable.c, which is assuming
that a numeric-looking parameter string should be taken as a numeric
user sysid, rather than an actual user name.

The reason this was done was to avoid the need to do catalog lookups
when restoring a prior setting during error recovery.  That's still a
valid concern, so right offhand I don't see an easy fix.  Any ideas?

			regards, tom lane



view thread (16+ messages)  latest in thread

Message-ID: <3032.1043791462@sss.pgh.pa.us>
Permalink:  ../3032.1043791462@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3032.1043791462@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michiel@minas.demon.nl, peter_e@gmx.net
  Subject: Re: [ADMIN] Cannot connect to the database (PG 7.3)
  In-Reply-To: <3032.1043791462@sss.pgh.pa.us>
  References: <18236.1043628134@sss.pgh.pa.us> <5.1.0.14.0.20030127011523.00b33440@192.168.1.3> <5.1.0.14.0.20030128221603.00b33d50@192.168.1.3> <1656.1043790202@sss.pgh.pa.us> <3032.1043791462@sss.pgh.pa.us>

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

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