aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/indexcmds.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2012-12-29 07:55:37 -0500
committerRobert Haas <rhaas@postgresql.org>2012-12-29 07:55:37 -0500
commit82b1b213cad3a69cf5f3dfaa81687c14366960fc (patch)
treee19129f124c02d7ef274393d584de97cc18a5f66 /src/backend/commands/indexcmds.c
parent5ab3af46ddd2f2c2b248f1ffdb688b394d4bb387 (diff)
downloadpostgresql-82b1b213cad3a69cf5f3dfaa81687c14366960fc.tar.gz
postgresql-82b1b213cad3a69cf5f3dfaa81687c14366960fc.zip
Adjust more backend functions to return OID rather than void.
This is again intended to support extensions to the event trigger functionality. This may go a bit further than we need for that purpose, but there's some value in being consistent, and the OID may be useful for other purposes also. Dimitri Fontaine
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r--src/backend/commands/indexcmds.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 75f9ff19cc7..1231b84c378 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -1671,7 +1671,7 @@ ChooseIndexColumnNames(List *indexElems)
* ReindexIndex
* Recreate a specific index.
*/
-void
+Oid
ReindexIndex(RangeVar *indexRelation)
{
Oid indOid;
@@ -1684,6 +1684,8 @@ ReindexIndex(RangeVar *indexRelation)
(void *) &heapOid);
reindex_index(indOid, false);
+
+ return indOid;
}
/*
@@ -1749,7 +1751,7 @@ RangeVarCallbackForReindexIndex(const RangeVar *relation,
* ReindexTable
* Recreate all indexes of a table (and of its toast table, if any)
*/
-void
+Oid
ReindexTable(RangeVar *relation)
{
Oid heapOid;
@@ -1762,6 +1764,8 @@ ReindexTable(RangeVar *relation)
ereport(NOTICE,
(errmsg("table \"%s\" has no indexes",
relation->relname)));
+
+ return heapOid;
}
/*
@@ -1772,7 +1776,7 @@ ReindexTable(RangeVar *relation)
* separate transaction, so we can release the lock on it right away.
* That means this must not be called within a user transaction block!
*/
-void
+Oid
ReindexDatabase(const char *databaseName, bool do_system, bool do_user)
{
Relation relationRelation;
@@ -1882,4 +1886,6 @@ ReindexDatabase(const char *databaseName, bool do_system, bool do_user)
StartTransactionCommand();
MemoryContextDelete(private_context);
+
+ return MyDatabaseId;
}