Sha256: e9bb785b707ba063064fb220e8c0c246199631a03d33b65f519ada71d16a7543
Contents?: true
Size: 461 Bytes
Versions: 75
Compression:
Stored size: 461 Bytes
Contents
#!/usr/bin/env ruby require 'pg' c = PG.connect( dbname: 'test' ) # this one works: c.exec( "DROP TABLE IF EXISTS foo" ) c.exec( "CREATE TABLE foo (strings character varying[]);" ) # But using a prepared statement works: c.set_error_verbosity( PG::PQERRORS_VERBOSE ) c.prepare( 'stmt', "INSERT INTO foo VALUES ($1);" ) # This won't work #c.exec_prepared( 'stmt', ["ARRAY['this','that']"] ) # but this will: c.exec_prepared( 'stmt', ["{'this','that'}"] )
Version data entries
75 entries across 75 versions & 6 rubygems