diff options
| author | Tom Lane | 2000-03-16 06:35:07 +0000 |
|---|---|---|
| committer | Tom Lane | 2000-03-16 06:35:07 +0000 |
| commit | d14c8aab99577d7dd06e9d50f3ac9c09d0334131 (patch) | |
| tree | 4741b82093bd82052d865f784e47622e8954d106 /src/include/parser | |
| parent | d4a2c86eaf6f5e6c656dd54a7e1967a927cfa2e9 (diff) | |
Turns out that Mazurkiewicz's gripe about 'function inheritance' is
actually a type-coercion problem. If you have a function defined on
class A, and class B inherits from A, then the function ought to work
on class B as well --- but coerce_type didn't know that. Now it does.
Diffstat (limited to 'src/include/parser')
| -rw-r--r-- | src/include/parser/parse_func.h | 4 | ||||
| -rw-r--r-- | src/include/parser/parse_type.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h index 9ee17203708..b191944ee2f 100644 --- a/src/include/parser/parse_func.h +++ b/src/include/parser/parse_func.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parse_func.h,v 1.22 2000/01/26 05:58:27 momjian Exp $ + * $Id: parse_func.h,v 1.23 2000/03/16 06:35:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -47,6 +47,8 @@ extern Node *ParseFuncOrColumn(ParseState *pstate, extern List *setup_base_tlist(Oid typeid); +extern bool typeInheritsFrom(Oid subclassTypeId, Oid superclassTypeId); + extern void func_error(char *caller, char *funcname, int nargs, Oid *argtypes, char *msg); diff --git a/src/include/parser/parse_type.h b/src/include/parser/parse_type.h index 034c47b8b0b..190d65db4d8 100644 --- a/src/include/parser/parse_type.h +++ b/src/include/parser/parse_type.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parse_type.h,v 1.12 2000/01/26 05:58:27 momjian Exp $ + * $Id: parse_type.h,v 1.13 2000/03/16 06:35:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -35,4 +35,6 @@ extern Oid GetArrayElementType(Oid typearray); extern Oid typeInfunc(Type typ); extern Oid typeOutfunc(Type typ); +#define ISCOMPLEX(typeid) (typeidTypeRelid(typeid) != InvalidOid) + #endif /* PARSE_TYPE_H */ |
