Add warnings to user-callable functions
This commit is contained in:
parent
6d1646db7a
commit
7f71f7c5e7
1 changed files with 6 additions and 0 deletions
6
pg_ivm.c
6
pg_ivm.c
|
|
@ -191,6 +191,8 @@ create_immv(PG_FUNCTION_ARGS)
|
|||
CreateTableAsStmt *ctas;
|
||||
StringInfoData command_buf;
|
||||
|
||||
warnIfPgIvmNotPreloaded();
|
||||
|
||||
parseNameAndColumns(relname, &names, &colNames);
|
||||
|
||||
initStringInfo(&command_buf);
|
||||
|
|
@ -250,6 +252,8 @@ refresh_immv(PG_FUNCTION_ARGS)
|
|||
QueryCompletion qc;
|
||||
StringInfoData command_buf;
|
||||
|
||||
warnIfPgIvmNotPreloaded();
|
||||
|
||||
initStringInfo(&command_buf);
|
||||
appendStringInfo(&command_buf, "SELECT refresh_immv('%s, %s);",
|
||||
relname, ispopulated ? "true" : "false");
|
||||
|
|
@ -364,6 +368,8 @@ get_immv_def(PG_FUNCTION_ARGS)
|
|||
Query *query = NULL;
|
||||
char *querystring = NULL;
|
||||
|
||||
warnIfPgIvmNotPreloaded();
|
||||
|
||||
/* Make sure IMMV is a table. */
|
||||
if (get_rel_relkind(matviewOid) != RELKIND_RELATION)
|
||||
PG_RETURN_NULL();
|
||||
|
|
|
|||
Loading…
Reference in a new issue