Bug or intentionally under-documented "\c databasename;" behavior?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Bug or intentionally under-documented "\c databasename;" behavior?
Дата
Msg-id CAKFQuwYwWh9wNWxbFAc_9apovbRo9Sfe8jRM7Mf98C8Tn2dE9A@mail.gmail.com
обсуждение исходный текст
Ответы Re: Bug or intentionally under-documented "\c databasename;" behavior?
Список pgsql-bugs
Hey,

I expected the following to tell me: database "testdb;" does not exist

Instead the connection attempt was successful.

postgres=# create database testdb;
CREATE DATABASE
postgres=# \c testdb;
You are now connected to database "testdb" as user "vagrant".

Specifically, the trailing semi-colon on the testdb is being treated, apparently, as a second parameter to \c (or just plain ignored which seems wrong too); which itself is a surprise given the absence of whitespace, and \c documents that - passed as a parameter is an acceptable way to omit a parameter so the semi-colon should have been considered as a username.

David J.

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Incorrect messages emitted from pgoutput when using column lists
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug or intentionally under-documented "\c databasename;" behavior?