[GB.DB.POSTGRESQL]
* NEW: Support for materialized views. git-svn-id: svn://localhost/gambas/trunk@7024 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
0f0f6ece42
commit
c1b219286d
1 changed files with 4 additions and 4 deletions
|
@ -1520,12 +1520,12 @@ static void table_release(DB_DATABASE *db, DB_INFO *info)
|
|||
static int table_exist(DB_DATABASE *db, const char *table)
|
||||
{
|
||||
const char *query =
|
||||
"select relname from pg_class where (relkind = 'r' or relkind = 'v') "
|
||||
"select relname from pg_class where (relkind = 'r' or relkind = 'v'or relkind = 'm') "
|
||||
"and (relname = '&1') "
|
||||
"and (relnamespace not in (select oid from pg_namespace where nspname = 'information_schema'))";
|
||||
|
||||
const char *query_schema =
|
||||
"select relname from pg_class where (relkind = 'r' or relkind = 'v') "
|
||||
"select relname from pg_class where (relkind = 'r' or relkind = 'v' or relkind = 'm') "
|
||||
"and (relname = '&1') "
|
||||
"and (relnamespace in (select oid from pg_namespace where nspname = '&2'))";
|
||||
|
||||
|
@ -1578,7 +1578,7 @@ static int table_exist(DB_DATABASE *db, const char *table)
|
|||
static int table_list_73(DB_DATABASE *db, char ***tables)
|
||||
{
|
||||
const char *query =
|
||||
"select pg_class.relname,pg_namespace.nspname from pg_class,pg_namespace where (pg_class.relkind = 'r' or pg_class.relkind = 'v') "
|
||||
"select pg_class.relname,pg_namespace.nspname from pg_class,pg_namespace where (pg_class.relkind = 'r' or pg_class.relkind = 'v' or pg_class.relkind = 'm') "
|
||||
"and (pg_namespace.oid = pg_class.relnamespace) "
|
||||
"and (pg_namespace.oid not in (select oid from pg_namespace where nspname = 'information_schema'))";
|
||||
|
||||
|
@ -1770,7 +1770,7 @@ static int table_primary_key(DB_DATABASE *db, const char *table, char ***primary
|
|||
static int table_is_system(DB_DATABASE *db, const char *table)
|
||||
{
|
||||
const char *query =
|
||||
"select 1 from pg_class where (relkind = 'r' or relkind = 'v') "
|
||||
"select 1 from pg_class where (relkind = 'r' or relkind = 'v'or relkind = 'm') "
|
||||
"and (relname = '&1') "
|
||||
"and (relnamespace in (select oid from pg_namespace where nspname = 'pg_catalog'))";
|
||||
|
||||
|
|
Loading…
Reference in a new issue