ctdbRenameTable
Renames the specified table from oldname to newname.
Declaration
ctdbRenameTable(CTHANDLE Handle, pTEXT oldname, pTEXT newname);
Description
SESSION_CTREE Mode
Prior to release V11, the FairCom DB API ctdbRenameTable() function was able to rename tables only with a valid database handle involved in the process, which made this function unusable when working with CTREE session modes.
In release V11 and later, new functionality has been implemented in ctdbRenameTable() so that, if a table handle that directly refers to a session is passed to the function, the rename is done at the CTREE level. If the first parameter is a database handle or a table handle referring to a database, the function continues to work as it has in the past.
Return Values
Value |
Symbolic Constant |
Explanation |
---|
0 |
CTDBRET_OK |
No Error. |
4012 |
CTDBRET_NOTACTIVE |
Database not active. |
4022 |
CTDBRET_TABLEEXIST |
Tablename already exists in database. |