Re: [HACKERS] psql and comments
От | Thomas Lockhart |
---|---|
Тема | Re: [HACKERS] psql and comments |
Дата | |
Msg-id | 37FCA084.ADB71A9B@alumni.caltech.edu обсуждение исходный текст |
Ответ на | Re: [HACKERS] psql and comments (Bruce Momjian <maillist@candle.pha.pa.us>) |
Ответы |
Re: [HACKERS] psql and comments
Re: [HACKERS] psql and comments |
Список | pgsql-hackers |
> > The following example shows psql correctly clearing its input buffer > > when a line containing *only* a comment is seen, but not completely > > clearing the buffer (or not realizing that it is cleared; note the > > changed prompt) if the comment is at the end of a valid query. > > > > postgres=> -- comment > > postgres=> select 'hi'; -- comment > > ?column? > > -------- > > hi > > (1 row) > > > > postgres-> > But aren't they _in_ a new statement, that begins with '--'? ?? Sure, that's what psql thinks. But the first case shown above should also begin a new statement, changing the prompt (it doesn't, because after stripping the comment there are zero blanks in the line). I don't think that is the right behavior though. Things aren't a big problem the way they stand, but istm that a completely blank line (after stripping single-line comments) may as well be the same as an empty line,and that psql could figure that out. - Thomas -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California
В списке pgsql-hackers по дате отправления: