Releases: sbdchd/squawk
Release list
Add more validation to parser + fmt improvements
Added
- parser: validation for builtin keyword usages & more (#1338)
- parser: validation for json_array/json_object, fmt quoting fixes (#1337)
- parser: validation for empty lists & related (#1336)
- parser: validation for extra commas/func args/only/graph table (#1335)
Changed
- parser: refactor named arg to not be a general expr (#1332)
Fixed
Update prefer-robust-stmts to be alembic version aware + code formatter
Added
-
linter: prefer-robust-stmts aware of alembic version update transactions (#1311). Thanks @DylanGriffith!
-
fmt: support for all statements (#1321, #1319, #1317, #1312, #1310, #1309, #1307, #1306, #1305, #1303, #1302, #1300, #1299)
-
ide: add formatting support (#1315)
-
ide: code action isnull -> is null, notnull -> is not null (#1296)
-
ide: code actions for func params (#1322)
-
ide: code action to convert
defaultto=in function syntax (#1316) -
ide: code actions for :=/=> & value/: rewrites (#1313)
-
parser: validation for variadic, function defaults, params (#1325, #1324, #1323)
-
parser: validate string literal type cast (#1320)
-
playground: add code formatting output (#1326)
Changed
- parser: split bit & time type ast nodes (#1297)
- parser: add nodes for interval & array bounds (#1301)
- parser: improve parsing of operators in using and exclude (#1304)
- parser: refactor percent type out of ast::Type (#1318)
- parser: refactor char type into character and varchar nodes (#1295)
Fixed
- syntax: fix unquoting & add more funcs (#1298)
ban-duplicate-column-assignment checks more queries
Added
-
syntax: add validation for empty tuple & overlaps (#1292)
-
syntax: add validation for in/not in (#1287)
-
ide: goto def for prepared transactions (#1291)
-
ide: goto def for savepoints (#1290)
-
ide: goto def for builtins like extract/substring/position (#1289)
-
ide: code actions for builtins -> pg functions (#1288)
-
ide: code actions unnest <-> rows from (#1284)
-
parser: split AliasColumnList into ColumnList & ColumnDefList (#1282)
Changed
- linter: update ban-duplicate-column-assignment to check more queries (#1274)
Fixed
Add ban-duplicate-column-assignments rule + parser improvements
Added
- linter: add ban-duplicate-column-assignments rule (#1263, #1262)
- ide: add code action to switch between comment types (#1271)
- ide: add code action
Rewrite integer as(#1266) - ide: fold where clauses (#1265)
Changed
- parser: refactor names/name refs into specific nodes (#1272, #1260, #1259, #1258, #1257, #1256, #1254, #1253)
Fixed
Parser Improvements & A Parser Fix
Changed
-
ide: refactor to use AnyName node (#1250)
-
parser: refactor ast::RelationFromItem to use ast::RelationNameRef (#1251)
-
parser: add more nodes for ast on top of cst -> more enums (#1248)
-
parser: refactor Name/NameRef to more specific nodes (#1246, #1247)
This also fixes schema qualified sequence names:
CREATE TABLE foo ( id int GENERATED ALWAYS AS IDENTITY (SEQUENCE NAME public.myseq START 1) );
require-timeout-settings rule is split & lock warning improvements
Added
-
linter: split require-timeout-settings rule (#1233, #1217). Thanks @zvdy!
Now there's
require-lock-timeoutandrequire-statement-timeout -
linter: require-timeout-settings explain lock impact in the warning (#1216, #1219). Thanks @edeetee!
Now instead of saying:
Missing `set lock_timeout` before potentially slow operationsWe say:
Missing `set lock_timeout` before potentially slow ACCESS EXCLUSIVE lock operations -
parser: add pg19 support for json_table plan & index include columns (#1243)
Changed
- parser: add type specific rename nodes for alter statements (#1244)
- parser: add more specific name nodes (#1242)
- parser: split Path into Path & PathRef (#1241)
- parser: ast nodes for ColumnRef, FromItem union & more (#1232)
Fixed
- server: goto def for text search, op class (#1239)
- server: goto def on collate, type attrs, search path, fn column name (#1238)
- server: fix goto def with select into, savepoints, paren join exprs (#1237)
- server: fix goto def with paren join expr (#1236)
- server: goto def for fn params, fn defaults, pub/sub, & more (#1234)
- server: add goto def support for constraints + parser improvements (#1229)
- server: fix various goto def gaps (#1227)
- server: add goto def support for operators & more (#1240)
- parser: fix explain/create rule/exists with extra parens (#1225)
- parser: fix parsing insert/create view/declare with parens (#1224)
- server: fix more goto def edge cases (#1223)
- parser: error for invalid legacy copy stmts (#1221)
- parser: fix option parsing edge cases (#1218)
Postgres 19 Parser Support + Various Fixes to Parser & Lexer
Added
- parser: support pg19 null treatment in aggregates (#1210)
Fixed
- parser: codegen
COL_NAME_KEYWORD_FIRSTandTYPE_FUNC_NAME_KEYWORDS(#1209) - parser: fix
graph_tablenot parsing as a column name (#1208) - parser: remove dead code & fix panics (#1207, #1206, #1204)
- parser: fix invalid field accesses causing panics (#1205)
- parser/lexer: give national strings own type, support
$$quoted string err recovery (#1213, #1211, #1212) - lexer: fix lexing
123$abc& string continuation validation (#1214)
Parser Fixes & Improvements
Fix False Positive with Require Schema Rule & Github Actions Output Clobbering
Added
- fmt: support comments in group by (#1194)
Fixed
-
linter: fix github actions output clobbering json/gcc (#1192)
-
linter: fix require table schema false positive on temp tables (#1191)
Previously this would error:
create temp table t (id bigint); -
parser: fix various ast gaps (#1190)
-
parser: fix index option parsing (#1188)
Previously this wouldn't parse:
create index index_name on public.table_name using gin (column_name public.gin__int_ops);
-
parser: add ast nodes & fix alter restart (#1193)
Fix Precommit Install & IDE Improvements
Fixed
-
ci: fix precommit install by declaring optional dependencies (#1180)
-
ide: fix
select *w/create view& more (#1184)The following now works correctly:
create table t(a int); -- ^ dest create view v as table t; select a$0 from v; -- ^ src
-
ide: treat
select intolikecreate table as(#1183)create table t(a bigint); -- ^ dest select * into u from t; select a from u; -- ^ src
-
ide: fix column resolution with cte & shadowing (#1182)
with outer_cte as (select 1 c) -- ^ dest select * from ( with inner_cte as (select 2 d) select c from outer_cte -- ^ src ) s;
-
ide: fix aliases not hiding original name (#1181)
create table t(a int); update t as u set a = t.a; -- ^ error
-
ide: fix cte & alias resolution (#1179)
with a as (select * from b), -- ^ src doesn't resolve b as (select 1 x) select * from a; -
ide: don't resolve trailing FromItems in a lateral subquery (#1177)
with d as (select 1 id, 2 amount), c as (select 2 id) select r.amount from d, lateral ( select d.amount from d where d.id = c.id -- ^ src doesn't resolve limit 1 ) r, c;