Re: [HACKERS] Re: SQL compliance - why -- comments only at psql level ?
От | Hannu Krosing |
---|---|
Тема | Re: [HACKERS] Re: SQL compliance - why -- comments only at psql level ? |
Дата | |
Msg-id | 38ADF3A9.B0F30A78@tm.ee обсуждение исходный текст |
Ответ на | Re: SQL compliance, was Re: [HACKERS] follow-up on PC Week Labsbenchmark results (Thomas Lockhart <lockhart@alumni.caltech.edu>) |
Ответы |
Re: [HACKERS] Re: SQL compliance - why -- comments only at psql level
?
|
Список | pgsql-hackers |
Tom Lane wrote: > > Hannu Krosing <hannu@tm.ee> writes: > > Thomas Lockhart wrote: > >> ... although InterBase was lauded for SQL92 compliance, the author > >> did encourage them to consider supporting the SQL92 comment delimiter > >> ("--") in their next release :)) > > > Why does PostgreSQL _not_ support the -- comment delimiter ? > > Better read it again, Hannu ... wasn't us that was being spoken of ... I got the impression from the paragraph that followed that we don't and the first query I tried bounced from commandline [hannu@hu hannu]$ psql -c "select count(*) from t1 -- what" ERROR: parser: parse error at or near "-" but worked interactively: [hannu@hu TeleHansaPlus]$ psql Welcome to the POSTGRESQL interactive sql monitor: Please read the file COPYRIGHT for copyright terms of POSTGRESQL [PostgreSQL 6.5.2 on i586-pc-linux-gnu, compiled by gcc egcs-2.91.66] type \? for help on slash commands type \q to quit type \g or terminate with semicolon to execute queryYou are currentlyconnected to the database: hannu hannu=> select count(*) from t1 -- what hannu-> ; count ----- 3 (1 row) and failed also when used from python [hannu@hu TeleHansaPlus]$ python Python 1.5.2 (#1, Apr 18 1999, 16:03:16) [GCC pgcc-2.91.60 19981201 (egcs-1.1.1 on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import pg >>> con=pg.connect('hannu') >>> con.query("select count(*) from t1 -- what") Traceback (innermost last): File "<stdin>", line 1, in ? pg.error: ERROR: parser: parse error at or near "-" So assumed it was handled in psql when in interactive mode. ------------ Hannu
В списке pgsql-hackers по дате отправления: