Skip to content

Commit

Permalink
error tests cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitml committed Mar 1, 2025
1 parent 66b34e4 commit 6da0fa2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions regress/expected/where-clause.out
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,24 @@ LINE 1: ...th space" FROM ONLY public.tbl_where_clause WHERE invalid_co...
ERROR: query failed: ERROR: syntax error at or near "="
LINE 1: ...ELECT * FROM ONLY "public"."tbl_where_clause" WHERE id === 3
^

+HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
+DETAIL: query was: INSERT INTO repack.table_18335 SELECT id,value,active,"column with space" FROM ONLY public.tbl_where_clause WHERE id === 3
-- Test 2: Unclosed quotes in where clause
\! pg_repack --dbname=contrib_regression --table=tbl_where_clause --where-clause="value = 'unclosed"
INFO: repacking table "public.tbl_where_clause"
ERROR: query failed: ERROR: unterminated quoted string at or near "'unclosed"
LINE 1: ...e" FROM ONLY public.tbl_where_clause WHERE value = 'unclosed
^
DETAIL: query was: INSERT INTO repack.table_18335 SELECT id,value,active,"column with space" FROM ONLY public.tbl_where_clause WHERE value = 'unclosed

-- Test 3: Type mismatch error in where clause
\! pg_repack --dbname=contrib_regression --table=tbl_where_clause --where-clause="id = 'not a number'"
INFO: repacking table "public.tbl_where_clause"
ERROR: query failed: ERROR: invalid input syntax for type integer: "not a number"
LINE 1: ...ace" FROM ONLY public.tbl_where_clause WHERE id = 'not a num...
^
DETAIL: query was: INSERT INTO repack.table_18335 SELECT id,value,active,"column with space" FROM ONLY public.tbl_where_clause WHERE id = 'not a number'

-- Test 4: Column with space in name
\! pg_repack --dbname=contrib_regression --table=tbl_where_clause --where-clause="\"column with space\" = 'one'"
INFO: repacking table "public.tbl_where_clause"

-- Clean up
DROP TABLE tbl_where_clause;
DROP TABLE tbl_where_clause;

0 comments on commit 6da0fa2

Please sign in to comment.