summaryrefslogtreecommitdiff
path: root/src/include/utils/tuplesort.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-01-29 17:06:26 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2013-01-29 17:08:26 -0500
commit991f3e5ab3f8196d18d5b313c81a5f744f3baaea (patch)
tree376f7a4bc5541156a3c270304dc22333f2ba6955 /src/include/utils/tuplesort.h
parent89d00cbe01447fd36edbc3bed659f869b18172d1 (diff)
downloadpostgresql-991f3e5ab3f8196d18d5b313c81a5f744f3baaea.tar.gz
Provide database object names as separate fields in error messages.
This patch addresses the problem that applications currently have to extract object names from possibly-localized textual error messages, if they want to know for example which index caused a UNIQUE_VIOLATION failure. It adds new error message fields to the wire protocol, which can carry the name of a table, table column, data type, or constraint associated with the error. (Since the protocol spec has always instructed clients to ignore unrecognized field types, this should not create any compatibility problem.) Support for providing these new fields has been added to just a limited set of error reports (mainly, those in the "integrity constraint violation" SQLSTATE class), but we will doubtless add them to more calls in future. Pavel Stehule, reviewed and extensively revised by Peter Geoghegan, with additional hacking by Tom Lane.
Diffstat (limited to 'src/include/utils/tuplesort.h')
-rw-r--r--src/include/utils/tuplesort.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/include/utils/tuplesort.h b/src/include/utils/tuplesort.h
index 8fdc6a1bf4..e69aafcd90 100644
--- a/src/include/utils/tuplesort.h
+++ b/src/include/utils/tuplesort.h
@@ -66,10 +66,12 @@ extern Tuplesortstate *tuplesort_begin_heap(TupleDesc tupDesc,
extern Tuplesortstate *tuplesort_begin_cluster(TupleDesc tupDesc,
Relation indexRel,
int workMem, bool randomAccess);
-extern Tuplesortstate *tuplesort_begin_index_btree(Relation indexRel,
+extern Tuplesortstate *tuplesort_begin_index_btree(Relation heapRel,
+ Relation indexRel,
bool enforceUnique,
int workMem, bool randomAccess);
-extern Tuplesortstate *tuplesort_begin_index_hash(Relation indexRel,
+extern Tuplesortstate *tuplesort_begin_index_hash(Relation heapRel,
+ Relation indexRel,
uint32 hash_mask,
int workMem, bool randomAccess);
extern Tuplesortstate *tuplesort_begin_datum(Oid datumType,