Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions __fixtures__/generated/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -21285,6 +21285,7 @@
"misc/issues-14.sql": "SELECT (1 IS NOT NULL) IS DISTINCT FROM (2 IS NOT NULL)",
"misc/issues-15.sql": "select \"A\" from \"table_name\"",
"misc/issues-16.sql": "select \"AA\" from \"table_name\"",
"misc/issues-17.sql": "SELECT CAST(t.date AT TIME ZONE $$America/New_York$$ AS text)::date FROM tbl t",
"misc/inflection-1.sql": "CREATE SCHEMA inflection",
"misc/inflection-2.sql": "GRANT USAGE ON SCHEMA inflection TO PUBLIC",
"misc/inflection-3.sql": "ALTER DEFAULT PRIVILEGES IN SCHEMA inflection \n GRANT EXECUTE ON FUNCTIONS TO PUBLIC",
Expand Down
5 changes: 4 additions & 1 deletion __fixtures__/kitchen-sink/misc/issues.sql
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,7 @@ SELECT (1 IS NOT NULL) IS DISTINCT FROM (2 IS NOT NULL);

-- https://github.com/launchql/pgsql-parser/issues/101
select "A" from "table_name";
select "AA" from "table_name";
select "AA" from "table_name";

-- https://github.com/launchql/pgsql-parser/issues/217
SELECT CAST(t.date AT TIME ZONE $$America/New_York$$ AS text)::date FROM tbl t;
3 changes: 2 additions & 1 deletion packages/deparser/__tests__/kitchen-sink/misc-issues.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ it('misc-issues', async () => {
"misc/issues-13.sql",
"misc/issues-14.sql",
"misc/issues-15.sql",
"misc/issues-16.sql"
"misc/issues-16.sql",
"misc/issues-17.sql"
]);
});
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`should format pg_catalog.char with pretty option enabled 1`] = `
"CREATE TABLE dashboard_jobs.jobs (
id bigserial PRIMARY KEY,
queue_name text DEFAULT public.gen_random_uuid()::text,
queue_name text DEFAULT (public.gen_random_uuid())::text,
task_identifier text NOT NULL,
payload pg_catalog.json DEFAULT '{}'::json NOT NULL,
priority int DEFAULT 0 NOT NULL,
Expand Down
Loading