Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitad7d3bd

Browse files
committed
Make domain types indexable. Rod Taylor & Tom Lane.
1 parent141539c commitad7d3bd

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

‎src/backend/commands/indexcmds.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.83 2002/08/15 03:04:07 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.84 2002/08/16 20:55:09 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -482,6 +482,9 @@ GetDefaultOpClass(Oid attrType, Oid accessMethodId)
482482
OidexactOid=InvalidOid;
483483
OidcompatibleOid=InvalidOid;
484484

485+
/* If it's a domain, look at the base type instead */
486+
attrType=getBaseType(attrType);
487+
485488
/*
486489
* We scan through all the opclasses available for the access method,
487490
* looking for one that is marked default and matches the target type

‎src/backend/utils/adt/ruleutils.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*back to source text
44
*
55
* IDENTIFICATION
6-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.114 2002/08/08 17:00:19 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.115 2002/08/16 20:55:09 tgl Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -2660,6 +2660,10 @@ get_opclass_name(Oid opclass, Oid actual_datatype,
26602660
char*opcname;
26612661
char*nspname;
26622662

2663+
/* Domains use their base type's default opclass */
2664+
if (OidIsValid(actual_datatype))
2665+
actual_datatype=getBaseType(actual_datatype);
2666+
26632667
ht_opc=SearchSysCache(CLAOID,
26642668
ObjectIdGetDatum(opclass),
26652669
0,0,0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp