mirror of
https://github.com/dg/dibi.git
synced 2025-08-04 05:07:36 +02:00
Merge pull request #142 from JanRossler/multi-search-path
PostgreSQL: fixed identifier escaping in reflection.
This commit is contained in:
@@ -476,7 +476,7 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver, IDibiResultDr
|
|||||||
*/
|
*/
|
||||||
public function getColumns($table)
|
public function getColumns($table)
|
||||||
{
|
{
|
||||||
$_table = $this->escape($table, dibi::TEXT);
|
$_table = $this->escape($this->escape($table, dibi::IDENTIFIER), dibi::TEXT);
|
||||||
$res = $this->query("
|
$res = $this->query("
|
||||||
SELECT indkey
|
SELECT indkey
|
||||||
FROM pg_class
|
FROM pg_class
|
||||||
@@ -543,7 +543,7 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver, IDibiResultDr
|
|||||||
*/
|
*/
|
||||||
public function getIndexes($table)
|
public function getIndexes($table)
|
||||||
{
|
{
|
||||||
$_table = $this->escape($table, dibi::TEXT);
|
$_table = $this->escape($this->escape($table, dibi::IDENTIFIER), dibi::TEXT);
|
||||||
$res = $this->query("
|
$res = $this->query("
|
||||||
SELECT
|
SELECT
|
||||||
a.attnum AS ordinal_position,
|
a.attnum AS ordinal_position,
|
||||||
@@ -591,7 +591,7 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver, IDibiResultDr
|
|||||||
*/
|
*/
|
||||||
public function getForeignKeys($table)
|
public function getForeignKeys($table)
|
||||||
{
|
{
|
||||||
$_table = $this->escape($table, dibi::TEXT);
|
$_table = $this->escape($this->escape($table, dibi::IDENTIFIER), dibi::TEXT);
|
||||||
|
|
||||||
$res = $this->query("
|
$res = $this->query("
|
||||||
SELECT
|
SELECT
|
||||||
|
Reference in New Issue
Block a user