$connectVars['port'] = (int)$this->port;
}
if ( $this->flags & self::DBO_SSL ) {
- $connectVars['sslmode'] = 1;
+ $connectVars['sslmode'] = 'require';
}
$this->connectString = $this->makeConnectionString( $connectVars );
!preg_match( '/^SELECT\s+pg_(try_|)advisory_\w+\(/', $sql );
}
+ /**
+ * @param string $sql
+ * @return bool|mixed|resource
+ */
public function doQuery( $sql ) {
$conn = $this->getBindingHandle();
return true;
}
+ protected function makeUpdateOptionsArray( $options ) {
+ if ( !is_array( $options ) ) {
+ $options = [ $options ];
+ }
+
+ // PostgreSQL doesn't support anything like "ignore" for
+ // UPDATE.
+ $options = array_diff( $options, [ 'IGNORE' ] );
+
+ return parent::makeUpdateOptionsArray( $options );
+ }
+
/**
* INSERT SELECT wrapper
* $varMap must be an associative array of the form [ 'dest1' => 'source1', ... ]
return [ $startOpts, $useIndex, $preLimitTail, $postLimitTail, $ignoreIndex ];
}
- public function getServer() {
- return $this->server;
- }
-
public function buildConcat( $stringList ) {
return implode( ' || ', $stringList );
}