psql misbehaves because of a simple typo

Поиск
Список
Период
Сортировка
От Serguei Mokhov
Тема psql misbehaves because of a simple typo
Дата
Msg-id 002a01c17afe$b6bff5c0$5dd9fea9@gunn
обсуждение исходный текст
Ответы Re: psql misbehaves because of a simple typo  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

Is it me (who hasn't read some FAQ or a doc/man page) or
it's a bug in the psql interactive terminal?

A sample session is provided at the bottom. I just typed
a simple CREATE TABLE command and did not put closing
parenthesis (I was typing too fast); I did put a semicolon, however.
psql gave me no error message whatsoever and accepted whatever
input afterwards and ignored it with the exception of \commands.

Was this reported? Do you need some other info?
Logs?

o I have a RHL7.1 and the tarball of 7.2b3 downloaded from the website.

o # ./configure  --enable-nls --enable-multibyte --enable-locale --enable-debug --enable-cassert

Here is the session:

[regress72b3@gunn regress72b3]$ /usr/local/pgsql/bin/psql test
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms      \h for help with SQL commands      \? for help on internal slash commands
    \g or terminate with semicolon to execute query      \q to quit
 

test=# create table test2(id serial;
test(# select version();
test(# ?
test(# \?\a             toggle between unaligned and aligned output mode\c[onnect] [DBNAME|- [USER]]
connectto new database (currently "test")\C TITLE       set table title\cd [DIRNAME]  change the current working
directory\copy...      perform SQL COPY with data stream to the client host\copyright     show PostgreSQL usage and
distributionterms\d TABLE       describe table (or view, index, sequence)\d{t|i|s|v}... list
tables/indexes/sequences/views\d{p|S|l}     list access privileges, system tables, or large objects\da            list
aggregatefunctions\dd NAME       show comment for table, type, function, or operator\df            list functions\do
       list operators\dT            list data types\e FILENAME    edit the current query buffer or file with external
editor\echoTEXT     write text to standard output\encoding ENCODING  set client encoding\f STRING      set field
separator\gFILENAME    send SQL command to server (and write results to file or |pipe)\h NAME        help on syntax of
SQLcommands, * for all commands\H             toggle HTML output mode (currently off)\i FILENAME    execute commands
fromfile\l             list all databases\lo_export, \lo_import, \lo_list, \lo_unlink               large object
operations\oFILENAME    send all query results to file or |pipe\p             show the content of the current query
buffer\psetVAR      set table output option (VAR := {format|border|expanded|
fieldsep|null|recordsep|tuples_only|title|tableattr|pager})\q            quit psql\qecho TEXT    write text to query
outputstream (see \o)\r             reset (clear) the query buffer\s FILENAME    print history or save it to file\set
NAMEVALUE  set internal variable\t             show only rows (currently off)\T TEXT        set HTML table tag
attributes\unsetNAME    unset (delete) internal variable\w FILENAME    write current query buffer to file\x
toggleexpanded output (currently off)\z             list table access privileges\! [COMMAND]   execute command in shell
orstart interactive shell
 
test-# select version();
ERROR:  parser: parse error at or near ";"
test=# select version();                          version
-------------------------------------------------------------PostgreSQL 7.2b3 on i686-pc-linux-gnu, compiled by GCC
2.96
(1 row)
test=#

--
Serguei A. Mokhov 



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

Предыдущее
От: mlw
Дата:
Сообщение: Yet more logging questions
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Second call for platform testing