Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B8C094777E9 for ; Tue, 28 Jan 2003 18:27:51 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id A3815476DBC for ; Tue, 28 Jan 2003 17:04:23 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h0SM4M5u003033; Tue, 28 Jan 2003 17:04:22 -0500 (EST) To: Michiel Lange Cc: pgsql-hackers@postgreSQL.org, Peter Eisentraut Subject: Re: [ADMIN] Cannot connect to the database (PG 7.3) 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> Comments: In-reply-to Tom Lane message dated "Tue, 28 Jan 2003 16:43:22 -0500" Date: Tue, 28 Jan 2003 17:04:22 -0500 Message-ID: <3032.1043791462@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/1079 X-Sequence-Number: 34689 I wrote: > Michiel Lange 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