summaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/lsyscache.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-10-04 18:22:59 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-10-04 18:22:59 +0000
commitb833c3d4a468975bfea1abc11feee1ca47de84b1 (patch)
tree176ef9da12832de572cb8fb14f13c6177c42eb39 /src/backend/utils/cache/lsyscache.c
parentec1fbbb5466e61b5f89b41738d858ebdaa312929 (diff)
Fix pg_get_constraintdef() to ensure CHECK constraints are always shown
with required outer parentheses. Breakage seems to be leftover from domain-constraint patches. This could be smarter about suppressing extra parens, but at this stage of the release cycle I want certainty not cuteness.
Diffstat (limited to 'src/backend/utils/cache/lsyscache.c')
-rw-r--r--src/backend/utils/cache/lsyscache.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index 3864a2fa52b..992be3ca4e3 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.107 2003/08/17 19:58:06 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.108 2003/10/04 18:22:59 tgl Exp $
*
* NOTES
* Eventually, the index information should go through here, too.
@@ -1470,37 +1470,6 @@ get_typtype(Oid typid)
}
/*
- * get_typname
- * Returns the name of a given type.
- *
- * Returns a palloc'd copy of the string, or NULL if no such type.
- *
- * NOTE: since type name is not unique, be wary of code that uses this
- * for anything except preparing error messages.
- */
-char *
-get_typname(Oid typid)
-{
- HeapTuple tp;
-
- tp = SearchSysCache(TYPEOID,
- ObjectIdGetDatum(typid),
- 0, 0, 0);
- if (HeapTupleIsValid(tp))
- {
- Form_pg_type typtup = (Form_pg_type) GETSTRUCT(tp);
- char *result;
-
- result = pstrdup(NameStr(typtup->typname));
- ReleaseSysCache(tp);
- return result;
- }
- else
- return NULL;
-}
-
-
-/*
* get_typ_typrelid
*
* Given the type OID, get the typrelid (InvalidOid if not a complex