mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-28 03:21:50 +02:00
index_insert has now HeapRelation as last param (for
unique index implementation).
This commit is contained in:
parent
c7990b35f7
commit
675457d6ab
@ -292,7 +292,7 @@ gistbuild(Relation heap,
|
|||||||
* It doesn't do any work; just locks the relation and passes the buck.
|
* It doesn't do any work; just locks the relation and passes the buck.
|
||||||
*/
|
*/
|
||||||
InsertIndexResult
|
InsertIndexResult
|
||||||
gistinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, bool is_update)
|
gistinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
|
||||||
{
|
{
|
||||||
InsertIndexResult res;
|
InsertIndexResult res;
|
||||||
IndexTuple itup;
|
IndexTuple itup;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.11 1996/11/13 20:46:48 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.12 1997/01/10 09:46:13 vadim Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This file contains only the public interface routines.
|
* This file contains only the public interface routines.
|
||||||
@ -257,7 +257,7 @@ hashbuild(Relation heap,
|
|||||||
* to the caller.
|
* to the caller.
|
||||||
*/
|
*/
|
||||||
InsertIndexResult
|
InsertIndexResult
|
||||||
hashinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, bool is_update)
|
hashinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
|
||||||
{
|
{
|
||||||
HashItem hitem;
|
HashItem hitem;
|
||||||
IndexTuple itup;
|
IndexTuple itup;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.9 1996/12/26 17:44:46 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.10 1997/01/10 09:46:25 vadim Exp $
|
||||||
*
|
*
|
||||||
* INTERFACE ROUTINES
|
* INTERFACE ROUTINES
|
||||||
* index_open - open an index relation by relationId
|
* index_open - open an index relation by relationId
|
||||||
@ -165,7 +165,7 @@ index_insert(Relation relation,
|
|||||||
Datum *datum,
|
Datum *datum,
|
||||||
char *nulls,
|
char *nulls,
|
||||||
ItemPointer heap_t_ctid,
|
ItemPointer heap_t_ctid,
|
||||||
bool is_update)
|
Relation heapRel)
|
||||||
{
|
{
|
||||||
RegProcedure procedure;
|
RegProcedure procedure;
|
||||||
InsertIndexResult specificResult;
|
InsertIndexResult specificResult;
|
||||||
@ -178,7 +178,7 @@ index_insert(Relation relation,
|
|||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
specificResult = (InsertIndexResult)
|
specificResult = (InsertIndexResult)
|
||||||
fmgr(procedure, relation, datum, nulls, heap_t_ctid, is_update, NULL);
|
fmgr(procedure, relation, datum, nulls, heap_t_ctid, heapRel, NULL);
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* the insert proc is supposed to return a "specific result" and
|
* the insert proc is supposed to return a "specific result" and
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.11 1996/11/15 18:36:59 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.12 1997/01/10 09:46:33 vadim Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This file contains only the public interface routines.
|
* This file contains only the public interface routines.
|
||||||
@ -222,7 +222,7 @@ btbuild(Relation heap,
|
|||||||
if (FastBuild) {
|
if (FastBuild) {
|
||||||
_bt_spool(index, btitem, spool);
|
_bt_spool(index, btitem, spool);
|
||||||
} else {
|
} else {
|
||||||
res = _bt_doinsert(index, btitem, isunique, false);
|
res = _bt_doinsert(index, btitem, isunique, heap);
|
||||||
}
|
}
|
||||||
|
|
||||||
pfree(btitem);
|
pfree(btitem);
|
||||||
@ -292,7 +292,7 @@ btbuild(Relation heap,
|
|||||||
* return an InsertIndexResult to the caller.
|
* return an InsertIndexResult to the caller.
|
||||||
*/
|
*/
|
||||||
InsertIndexResult
|
InsertIndexResult
|
||||||
btinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, bool is_update)
|
btinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation heapRel)
|
||||||
{
|
{
|
||||||
BTItem btitem;
|
BTItem btitem;
|
||||||
IndexTuple itup;
|
IndexTuple itup;
|
||||||
@ -308,7 +308,7 @@ btinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, bool is_u
|
|||||||
btitem = _bt_formitem(itup);
|
btitem = _bt_formitem(itup);
|
||||||
|
|
||||||
res = _bt_doinsert(rel, btitem,
|
res = _bt_doinsert(rel, btitem,
|
||||||
IndexIsUnique(RelationGetRelationId(rel)), is_update);
|
IndexIsUnique(RelationGetRelationId(rel)), heapRel);
|
||||||
|
|
||||||
pfree(btitem);
|
pfree(btitem);
|
||||||
pfree(itup);
|
pfree(itup);
|
||||||
|
Loading…
Reference in New Issue
Block a user