summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2009-08-01 19:59:41 +0000
committerTom Lane2009-08-01 19:59:41 +0000
commitb680ae4bdbf1c7fd78e6988bbe8f89e1e1b5db86 (patch)
treec8a7f8bc0084a15ff3cdbb5b1b4476c69185ca80 /src/include
parent2487d872e025312e7c16f0dd772190c6787efeea (diff)
Improve unique-constraint-violation error messages to include the exact
values being complained of. In passing, also remove the arbitrary length limitation in the similar error detail message for foreign key violations. Itagaki Takahiro
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/genam.h4
-rw-r--r--src/include/access/itup.h4
-rw-r--r--src/include/utils/builtins.h3
3 files changed, 8 insertions, 3 deletions
diff --git a/src/include/access/genam.h b/src/include/access/genam.h
index a8c0e02929..1902526577 100644
--- a/src/include/access/genam.h
+++ b/src/include/access/genam.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/genam.h,v 1.79 2009/07/29 20:56:19 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/access/genam.h,v 1.80 2009/08/01 19:59:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -164,6 +164,8 @@ extern FmgrInfo *index_getprocinfo(Relation irel, AttrNumber attnum,
extern IndexScanDesc RelationGetIndexScan(Relation indexRelation,
int nkeys, ScanKey key);
extern void IndexScanEnd(IndexScanDesc scan);
+extern void ReportUniqueViolation(Relation indexRelation,
+ Datum *values, bool *isnull);
/*
* heap-or-index access to system catalogs (in genam.c)
diff --git a/src/include/access/itup.h b/src/include/access/itup.h
index 8527de65c9..ead628fec2 100644
--- a/src/include/access/itup.h
+++ b/src/include/access/itup.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/itup.h,v 1.51 2009/01/01 17:23:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/itup.h,v 1.52 2009/08/01 19:59:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -143,6 +143,8 @@ extern IndexTuple index_form_tuple(TupleDesc tupleDescriptor,
Datum *values, bool *isnull);
extern Datum nocache_index_getattr(IndexTuple tup, int attnum,
TupleDesc tupleDesc, bool *isnull);
+extern void index_deform_tuple(IndexTuple tup, TupleDesc tupleDescriptor,
+ Datum *values, bool *isnull);
extern IndexTuple CopyIndexTuple(IndexTuple source);
#endif /* ITUP_H */
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 72b39f7068..481eacf9b9 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.335 2009/07/29 20:56:21 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.336 2009/08/01 19:59:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -575,6 +575,7 @@ extern Datum pg_get_viewdef_name_ext(PG_FUNCTION_ARGS);
extern Datum pg_get_indexdef(PG_FUNCTION_ARGS);
extern Datum pg_get_indexdef_ext(PG_FUNCTION_ARGS);
extern char *pg_get_indexdef_string(Oid indexrelid);
+extern char *pg_get_indexdef_columns(Oid indexrelid, bool pretty);
extern Datum pg_get_triggerdef(PG_FUNCTION_ARGS);
extern Datum pg_get_constraintdef(PG_FUNCTION_ARGS);
extern Datum pg_get_constraintdef_ext(PG_FUNCTION_ARGS);