Postgres module

execute_script

procedure · 1 overloadsince 0.27.0Source

Runs SQL that may hold several statements, without parameters (the simple query protocol), and discards any rows. For migrations and scripts. Without an explicit BEGIN the whole string runs as one implicit transaction, so the first error stops it and undoes the statements before it.

execute_script :: (c: *Connection, sql: string) -> Pg_Error

Runs SQL that may hold several statements, without parameters (the simple query protocol), and discards any rows. For migrations and scripts. Without an explicit BEGIN the whole string runs as one implicit transaction, so the first error stops it and undoes the statements before it.

Parameters

c: *Connection
the connection.
sql: string
the statements, separated by semicolons.

Returns

See also