pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #8373: can create database with long name , but can't connect
3+ messages / 3 participants
[nested] [flat]

* BUG #8373: can create database with long name , but can't connect
@ 2013-08-07 14:44  gerrit.geurs@hp.com
  0 siblings, 2 replies; 3+ messages in thread

From: gerrit.geurs@hp.com @ 2013-08-07 14:44 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      8373
Logged by:          Gerrit Geurs
Email address:      gerrit.geurs@hp.com
PostgreSQL version: 9.2.4
Operating system:   RHEL 6.4
Description:        

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.






-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #8373: can create database with long name , but can't connect
@ 2013-08-07 15:32  Pavan Deolasee <pavan.deolasee@gmail.com>
  parent: gerrit.geurs@hp.com
  1 sibling, 0 replies; 3+ messages in thread

From: Pavan Deolasee @ 2013-08-07 15:32 UTC (permalink / raw)
  To: gerrit.geurs@hp.com; +Cc: pgsql-bugs

On Wed, Aug 7, 2013 at 8:14 PM, <gerrit.geurs@hp.com> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      8373
> Logged by:          Gerrit Geurs
> Email address:      gerrit.geurs@hp.com
> PostgreSQL version: 9.2.4
> Operating system:   RHEL 6.4
> Description:
>
> 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
>
>
You misspelled the database name. Please check.
vergunningen_sit - What you are connecting
vergunnigen_sit - What you created


Thanks,
Pavan
-- 
Pavan Deolasee
http://www.linkedin.com/in/pavandeolasee

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #8373: can create database with long name , but can't connect
@ 2013-08-07 15:35  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: gerrit.geurs@hp.com
  1 sibling, 0 replies; 3+ messages in thread

From: Alvaro Herrera @ 2013-08-07 15:35 UTC (permalink / raw)
  To: gerrit.geurs@hp.com; +Cc: 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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2013-08-07 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-08-07 14:44 BUG #8373: can create database with long name , but can't connect gerrit.geurs@hp.com
2013-08-07 15:32 ` Pavan Deolasee <pavan.deolasee@gmail.com>
2013-08-07 15:35 ` Alvaro Herrera <alvherre@2ndquadrant.com>

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