Binding parameters to postgres query in Perl using names Binding parameters to postgres query in Perl using names postgresql postgresql

Binding parameters to postgres query in Perl using names


It is supported, but discouraged:

The final placeholder type is "named parameters" in the format ":foo". While this syntax is supported by DBD::Pg, its use is discouraged in favor of dollar-sign numbers.

The different types of placeholders cannot be mixed within a statement, but you may use different ones for each statement handle you have. This is confusing at best, so stick to one style within your program.


The Postgres driver is in the module DBD::Pg (offline documentation: perldoc DBD::Pg).