Re: Comments in .sql files

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Comments in .sql files
Дата
Msg-id 2299.1059698693@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Comments in .sql files  ("Chad N. Tindel" <chad@tindel.net>)
Ответы Bug in comment parsing? [was: Re: Comments in .sql files]  (Rory Campbell-Lange <rory@campbell-lange.net>)
Список pgsql-general
"Chad N. Tindel" <chad@tindel.net> writes:
> 1.  It obviously doesn't like the # notation for comments.  What is the proper
> way to put comments in schema files?

The SQL-standard comment syntaxes are

    -- comment to end of line

    /* C-like comment, possibly multiple lines */

We do both.  There are a lot of not-SQL-standard comment syntaxes
accepted by various other databases ...

> 2.  Why does postgres ignore the first insert?  Shouldn't it just barf on
> the "#" line and keep going?

Since it doesn't think # is a comment introducer, it sees an invalid
multiline statement running up to the first ';'.

> 3.  Is there a way to turn of the notices about creating implicit sequences
> and indices?

Set client_min_messages higher than NOTICE.

            regards, tom lane

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

Предыдущее
От: "Cory 'G' Watson"
Дата:
Сообщение: Re: optimum postgres server configuration
Следующее
От: R C
Дата:
Сообщение: Problem install DBD-pg in Redhat Linux 7.2