Thread: Minor bug: Odd feedback on STDERR from PSQL for block comments
Guys, Here's a non-showstopper in 7.4RC1, but probably good to fix before RC2: (btw, tested & exists on beta4 as well, so I'm not sure when it was=20 introduced) 1) Create a file with *only* a block comment in it, or with a block comment= as=20 the very last line. 2) run psql -f filename database You will get some odd feedback on STDERR: on Linux, file with only a block comment: josh@temoku:~/Documents/oss/postgres> psql -f tempit2.sql -U postgres test1 psql:tempit2.sql:1: josh@temoku:~/Documents/oss/postgres> on OSX: josh% /usr/local/pgsql/bin/psql -U postgres -f ~/test.sql sharky psql:/Users/josh/test.sql:1: [mercury:~] josh% on Linux, file with several commands, ending in a block comment: josh@temoku:~/Documents/oss/postgres/phpcon> psql -f tempit.sql -U postgres= =20 test1 CREATE TABLE INSERT 17168 1 INSERT 17169 1 INSERT 17170 1 psql:tempit.sql:13: ERROR: column "iddomain" does not exist DELETE 1 psql:tempit.sql:18: josh@temoku:~/Documents/oss/postgres/phpcon> I'm not sure why we're getting a line header ("psql:tempit2.sql:1: ") on an= =20 empty line, but it's annoying for any application writer (Bricolage) lookin= g=20 for failure messages on STDERR. --=20 -Josh Berkus Aglio Database Solutions San Francisco
Josh Berkus <josh@agliodbs.com> writes: > Here's a non-showstopper in 7.4RC1, but probably good to fix before RC2: > 1) Create a file with *only* a block comment in it, or with a block comment as > the very last line. > 2) run psql -f filename database > You will get some odd feedback on STDERR: I can confirm the problem. It happens in more cases than Josh mentions, as well: -- running the file with \i also shows the problem -- there can be blank lines and whitespace after the block comment, and it still shows up. Example: z.sql contains --- snip --- select 2+2; /* block */ -- z --- snip --- regression=# \i z.sql ?column? ---------- 4 (1 row) psql:z.sql:5: regression=# Peter, do you have time to look at this? You're probably more familiar than I am with the psql command loop. regards, tom lane
Josh Berkus <josh@agliodbs.com> writes: > This bug is still present in RC2. Are we going to fix it before release? I have a fix (stupid case omission in AcceptResult()) but I am having some trouble reaching the CVS server right at the moment ... regards, tom lane
Guys, > I can confirm the problem. It happens in more cases than Josh mentions, > as well: > -- running the file with \i also shows the problem > -- there can be blank lines and whitespace after the > block comment, and it still shows up. This bug is still present in RC2. Are we going to fix it before release?= =20=20=20 According to David W., it really screws up the error-detection code on=20 Bricolage, and I'd think that other applications might have the same proble= m. --=20 -Josh Berkus Aglio Database Solutions San Francisco