Search Postgresql Archives

Re: Leading comments and client applications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Philip Semanchuk <philip@xxxxxxxxxxxxxxxxxxxxx> writes:
> I'm trying to understand a behavior where, with our Postgres client, a leading comment in a SQL script causes the CREATE FUNCTION statement following it to be not executed. I can't figure out if this is a bug somewhere or just a misunderstanding on my part. I would appreciate some help understanding.

Are you certain there's actually a newline after the comment?
The easiest explanation for this would be if something in the
SQLAlchemy code path were munging the newline.

A completely different line of thought is that the function
*does* get created, but inside a transaction that never
gets committed.  Either way, I think this is mainly a SQLAlchemy
question not a Postgres question.

As far as the comparison behavior goes, psql's parser strips
comments that start with double dashes, for $obscure_reasons.
The server is perfectly capable of ignoring those by itself,
though.  (Awhile back I tried to remove that psql behavior,
but it caused too much churn in our regression tests.)

			regards, tom lane






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux