Re: BUG #8373: can create database with long name , but can't connect

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #8373: can create database with long name , but can't connect
Дата
Msg-id 20130807153552.GG10718@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на BUG #8373: can create database with long name , but can't connect  (gerrit.geurs@hp.com)
Список pgsql-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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Pavan Deolasee
Дата:
Сообщение: Re: BUG #8373: can create database with long name , but can't connect
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #8335: trim() un-document behaviour