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

Commit46aaa5d

Browse files
committed
Appears there is a problem finding the opclass when indexing a domain.
CREATE DOMAIN newint as int4;CREATE TABLE tab (col newint unique);ERROR: data type newint has no default operator class for access method"btree" You must specify an operator class for the index or define a default operator class for the data typeSpecifically, GetDefaultOpClass() finds 0 exact matches and 3 binarycompatible matches. Fetching getBaseType() of the attribute fixes theproblem for domains (see attachment).Rod Taylor
1 parent45e2544 commit46aaa5d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
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.81 2002/08/07 21:45:01 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.82 2002/08/15 02:53:35 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -482,6 +482,9 @@ GetDefaultOpClass(Oid attrType, Oid accessMethodId)
482482
OidexactOid=InvalidOid;
483483
OidcompatibleOid=InvalidOid;
484484

485+
/* It could be a domain */
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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp