Hello Tom,
Personally I think "pgbench: " adds very little and so I'd rather get
rid of it, but I'm sure others feel differently.
I think that one of the reason for this is that once pgbench started to
run it is desirable to differentiate error messages that come from libpq
and those that come from pgbench itsef.
Although for some messages this may be obvious, this may not always be the
case.
For instance "invalid variable name", such a message may come from a
plpgsql function invoked.
Example from psql with a prefix:
sh> psql -p 12345678
psql: invalid port number: "12345678"
Another issue here is that when dealing with custom scripts, IMO it
would be really helpful to provide the file name, line number, and
perhaps line text whenever a message is about an identifiable command.
That's mostly not happening at present, except for the aforesaid
inconsistent mentions of metacommand names. To make that happen, we'd
need to agree on a formatting convention for attaching the info. I'd be
inclined to put it on a separate line, but beyond that have no specific
thoughts.
Just to bootstap something, say:
pgbench "test.sql": error message...
Then maybe:
LINE 3: content of the line if available...
I'm not sure that the line contents would necessarily be available, it may
have been tokenized in some cases, if so it may have to be kept around.
I'm not sure how to deal with "internal" scripts. Maybe:
pgbench "TPC-B (sort-of)": ...
--
Fabien.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers