mirror of
https://github.com/pgvector/pgvector.git
synced 2026-12-06 01:08:35 +00:00
Made amvalidate functions more consistent with Postgres [skip ci]
This commit is contained in:
1 parent
1daf049154
commit
30ba0cf556
2 files changed
+12
-8
No files matched your search
+6
-4
@@ -310,18 +310,20 @@ hnswvalidate(Oid opclassoid)
|
||||
Form_pg_amproc procform = (Form_pg_amproc) GETSTRUCT(proctup);
|
||||
bool ok;
|
||||
|
||||
/* Check matching types */
|
||||
if (procform->amproclefttype != opcintype || procform->amproclefttype != procform->amprocrighttype)
|
||||
/* Check matching left/right types */
|
||||
if (procform->amproclefttype != procform->amprocrighttype)
|
||||
{
|
||||
ereport(INFO,
|
||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||
errmsg("operator family \"%s\" of access method %s contains support function %s with different types",
|
||||
errmsg("operator family \"%s\" of access method %s contains support function %s with different left and right input types",
|
||||
opfamilyname, "hnsw",
|
||||
format_procedure(procform->amproc))));
|
||||
result = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (procform->amproclefttype != opcintype)
|
||||
continue;
|
||||
|
||||
/* Check procedure numbers and function signatures */
|
||||
switch (procform->amprocnum)
|
||||
{
|
||||
|
||||
+6
-4
@@ -227,18 +227,20 @@ ivfflatvalidate(Oid opclassoid)
|
||||
Form_pg_amproc procform = (Form_pg_amproc) GETSTRUCT(proctup);
|
||||
bool ok;
|
||||
|
||||
/* Check matching types */
|
||||
if (procform->amproclefttype != opcintype || procform->amproclefttype != procform->amprocrighttype)
|
||||
/* Check matching left/right types */
|
||||
if (procform->amproclefttype != procform->amprocrighttype)
|
||||
{
|
||||
ereport(INFO,
|
||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||
errmsg("operator family \"%s\" of access method %s contains support function %s with different types",
|
||||
errmsg("operator family \"%s\" of access method %s contains support function %s with different left and right input types",
|
||||
opfamilyname, "ivfflat",
|
||||
format_procedure(procform->amproc))));
|
||||
result = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (procform->amproclefttype != opcintype)
|
||||
continue;
|
||||
|
||||
/* Check procedure numbers and function signatures */
|
||||
switch (procform->amprocnum)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user