can't handle valid set syntax
Example:
set intervalstyle = 'sql_standard';
AFAIK, that's perfectly valid PostgreSQL.
See this for an explanation: https://github.com/Borvik/vscode-postgres/issues/160
Also result window outputs this:
{"command":"SET","rowCount":null,"oid":null,"rows":[],"fields":[],"RowCtor":null,"rowAsArray":true}
Maybe it should just hide the output?
Aha, I see it in the db console now. Thanks for explanation.
db-1 | 2023-05-19 16:46:27.117 UTC [462] ERROR: syntax error at or near "set" at character 9
db-1 | 2023-05-19 16:46:27.117 UTC [462] STATEMENT: EXPLAIN set intervalstyle = 'iso_8601';
as for hiding the output... I would not propose that entirely... mainly because with 0 output you wouldn't know success/failure of the command being run
however changing the format/output for various commands (like SET, or other non-standard results) would definitely be considered
Agreed. Maybe just [command] success or something similar.
NEVERMIND: Just read the README. ;-)
Which brings me to my original issue, how to override the format for an interval?
It appears to be hard-coded to iso_8601, but I'd like to change it to sql_standard. But doing anything with intervalstyle seems to produce corrupt output.
in order for the interval to be formatted and parsed by the extension - it needs to be returned from postgres in a consistent format
to alter the format uses a setting:
Yep, thx! Just found that. Sorry for the noise.