Skip to content

Commit bc20ace

Browse files
schmiddydvarrazzo
authored andcommitted
Use quote_identifier() to properly escape column names in UPDATE statement, per report from Dimitrije Radojevic.
1 parent 612495e commit bc20ace

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pg_reorg.sql.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ LANGUAGE sql STABLE STRICT;
8080

8181
CREATE FUNCTION reorg.get_assign(oid, text) RETURNS text AS
8282
$$
83-
SELECT '(' || array_to_string(reorg.array_accum(attname), ', ') ||
83+
SELECT '(' || array_to_string(reorg.array_accum(quote_ident(attname)), ', ') ||
8484
') = (' || $2 || '.' ||
8585
array_to_string(reorg.array_accum(quote_ident(attname)), ', ' || $2 || '.') || ')'
8686
FROM (SELECT attname FROM pg_attribute

0 commit comments

Comments
 (0)