Skip to content

Commit 4791c19

Browse files
committed
Format regtype with %s. Fix for #5
1 parent bec43e3 commit 4791c19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphql.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ CREATE FUNCTION format_comparison(x regclass, xs name[], ys text[])
505505
RETURNS text AS $$
506506
WITH xs(col) AS (SELECT format('%s.%I', x, col) FROM unnest(xs) AS _(col)),
507507
named(col, txt) AS (SELECT * FROM unnest(xs, ys)),
508-
casted(val) AS (SELECT format('%L::%I', txt, typ)
508+
casted(val) AS (SELECT format('CAST(%L AS %s)', txt, typ)
509509
FROM named JOIN graphql.cols(x) USING (col))
510510
SELECT format('(%s) = (%s)',
511511
array_to_string((SELECT array_agg(col) FROM xs), ', '),

0 commit comments

Comments
 (0)