# File lib/dbd/pg/database.rb, line 238
238:     def []=(attr, value)
239:         case attr
240:         when 'AutoCommit'
241:             if @attr['AutoCommit'] != value then
242:                 if value    # turn AutoCommit ON
243:                     if @in_transaction
244:                         # TODO: commit outstanding transactions?
245:                         _exec("COMMIT")
246:                         @in_transaction = false
247:                     end
248:                 else        # turn AutoCommit OFF
249:                     @in_transaction = false
250:                 end
251:             end
252:         # value is assigned below
253:         when 'NonBlocking', 'pg_async'
254:             # booleanize input
255:             value = value ? true : false
256:             @pgexec = (value ? DBI::DBD::Pg::PgExecutorAsync : DBI::DBD::Pg::PgExecutor).new(@connection)
257:             # value is assigned to @attr below
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 # option for some other driver - quitly ignore
266:                 return
267:             end
268:         end
269:         @attr[attr] = value
270:     end