From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: gerrit.geurs@hp.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8373: can create database with long name , but can't connect
Date: Wed, 7 Aug 2013 11:35:52 -0400
Message-ID: <20130807153552.GG10718@eldon.alvh.no-ip.org> (raw)
In-Reply-To: <E1V74yC-0004Vk-2D@wrigleys.postgresql.org>
References: <E1V74yC-0004Vk-2D@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
gerrit.geurs@hp.com wrote:
> template1=# CREATE DATABASE vergunnigen_sit;
> CREATE DATABASE
> template1=# GRANT ALL PRIVILEGES ON DATABASE vergunnigen_sit to postgres;
> GRANT
> template1=# \q
> -bash-4.1$ psql vergunningen_sit
> psql: FATAL: database "vergunningen_sit" does not exist
>
>
> When I do a \LIST, THE LONG NAME IS LISTED.
I think you have misdiagnosed the problem. Maybe your psql is trying to
connect to another server, not the one on which you just created the
database. It certainly works for me:
alvherre=# create database "you think that's a long database name, huh?";
CREATE DATABASE
alvherre=# \q
$ psql -d "you think that's a long database name, huh?"
psql (9.2.4)
Digite «help» para obtener ayuda.
you think that's a long database name, huh?=# select current_database();
-[ RECORD 1 ]----+--------------------------------------------
current_database | you think that's a long database name, huh?
You can use up to 63 bytes in a database name (or any other identifier,
for that matter).
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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-bugs@postgresql.org
Cc: alvherre@2ndquadrant.com, gerrit.geurs@hp.com
Subject: Re: BUG #8373: can create database with long name , but can't connect
In-Reply-To: <20130807153552.GG10718@eldon.alvh.no-ip.org>
References: <E1V74yC-0004Vk-2D@wrigleys.postgresql.org> <20130807153552.GG10718@eldon.alvh.no-ip.org>
* 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