Postgres module

rewrite_placeholders

procedure · 1 overloadsince 0.27.0Source

Rewrites % to $1, $2, ... in order and %% to %. A $n of Postgres' own in the source is an error: one style only. Text inside quotes and comments is copied as it is.

rewrite_placeholders :: (source: string) -> Rewrite

Rewrites % to $1, $2, ... in order and %% to %. A $n of Postgres' own in the source is an error: one style only. Text inside quotes and comments is copied as it is.

Parameters

source: string
the statement as the user wrote it, with % holes.

Returns

See also