pg_slythe

Adrian Klaver aklaver at comcast.net
Thu May 11 19:30:35 UTC 2006


Thanks. It works if the env variable PGUSER is set. If the variable is not set 
than it does not to read the -U option and fails on the default settings.

Success:
aklaver at tucker:~> export PGUSER='aklaver'
aklaver at tucker:~> pg_python -d business_app  -h localhost -U postgres
Python 2.4.2 (#9, Mar  2 2006, 07:39:00)
[GCC 3.3.3 (SuSE Linux)]
PostgreSQL 8.1.3 on i686-pc-linux-gnu
>>>

Failure:
aklaver at tucker:~> export -n PGUSER='aklaver'
aklaver at tucker:~> pg_python -d business_app  -h localhost -U postgres
Traceback (most recent call last):
  File "/usr/local/bin/pg_python", line 254, in ?
    main(sys.argv)
  File "/usr/local/bin/pg_python", line 143, in main
    from postgresql.utility.client import option
  File 
"/usr/local/lib/python2.4/site-packages/postgresql/utility/client/option.py", 
line 34, in ?
    default = os.environ.get('PGUSER') or os.getlogin() or None,
OSError: [Errno 2] No such file or directory

On Wednesday 10 May 2006 07:29 pm, James William Pye wrote:
> On Wed, May 10, 2006 at 08:08:54AM -0700, Adrian Klaver wrote:
> > I seem to be having problems using the remote console.  When I try to
> > connect the following happens. For some reason my user name is being used
> > as the database name. I have tried different orderings to no effect. Am I
> > missing something?
>
> Nope, I forgot to forward the database keyword for the Connector.
> Fixed in HEAD. Thanks for the report.
>
> (Yeah, I missed this as I was testing it with a cluster that is the same
> name as my user.)

-- 
Adrian Klaver	
aklaver at comcast.net


More information about the Python-general mailing list