mirror of
https://github.com/dg/dibi.git
synced 2025-08-04 13:17:58 +02:00
PostgreSQL: fixed identifier escaping in reflection.
This commit is contained in:
@@ -480,7 +480,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
|
||||||
@@ -520,7 +520,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 ordinal_position, column_name
|
SELECT ordinal_position, column_name
|
||||||
FROM information_schema.columns
|
FROM information_schema.columns
|
||||||
@@ -561,7 +561,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