238: def []=(attr, value)
239: case attr
240: when 'AutoCommit'
241: if @attr['AutoCommit'] != value then
242: if value
243: if @in_transaction
244:
245: _exec("COMMIT")
246: @in_transaction = false
247: end
248: else
249: @in_transaction = false
250: end
251: end
252:
253: when 'NonBlocking', 'pg_async'
254:
255: value = value ? true : false
256: @pgexec = (value ? DBI::DBD::Pg::PgExecutorAsync : DBI::DBD::Pg::PgExecutor).new(@connection)
257:
258: when 'pg_client_encoding'
259: @connection.set_client_encoding(value)
260: when 'pg_native_binding'
261: @attr[attr] = value
262: else
263: if attr =~ /^pg_/ or attr != /_/
264: raise DBI::NotSupportedError, "Option '#{attr}' not supported"
265: else
266: return
267: end
268: end
269: @attr[attr] = value
270: end