Skip to content

fix: WHPG compatibility#444

Merged
usamoi merged 3 commits intotensorchord:mainfrom
Ngalstyan4:narek/pg12-fixes
Mar 24, 2026
Merged

fix: WHPG compatibility#444
usamoi merged 3 commits intotensorchord:mainfrom
Ngalstyan4:narek/pg12-fixes

Conversation

@Ngalstyan4
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 17, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

),
};
pgrx::info!(
pgrx::debug1!(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everywhere else in postgres or common extensions, CREATE EXTENSION does not produce any logs in the common success case. This change brings vchord to par with this expectation.

It is annoying when I am directly running commands in psql and unnecessary output logs move more important commands and outputs out of my terminal view.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everywhere else in postgres or common extensions, CREATE EXTENSION does not produce any logs in the common success case.

Do you mean CREATE INDEX? VectorChord should not print logs in CREATE EXTENSION.

This change brings vchord to par with this expectation.

We consider this a feature, so it would be inappropriate to hide it directly.

It is annoying when I am directly running commands in psql and unnecessary output logs move more important commands and outputs out of my terminal view.

You can change all pgrx::info in the code to pgrx::notice. Then, use SET client_min_messages = warning to hide these messages.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found that you're not hiding the logs of clustering. I think this change is reasonable, although I don't understand why you ignore the 10+ lines of clustering-related logs above and only focus on the 3 lines at the bottom.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, those had not triggered in my test run. now I see what you mean. happy to turn those into debug1 as well if that works for you!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happy to turn those into debug1 as well if that works for you!

Keep it as it is.

Copy link
Copy Markdown
Contributor

@usamoi usamoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please

  1. sign off commits by git rebase HEAD~3 --signoff
  2. sign CLA according to #444 (comment)

@usamoi usamoi changed the title Narek/pg12 fixes fix: WHPG compatibility Mar 19, 2026
@Ngalstyan4
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Ngalstyan4 and others added 3 commits March 23, 2026 18:46
Co-authored-by: Artjoms Iskovs <mildbyte@gmail.com>
Signed-off-by: Narek Galstyan <narekg@berkeley.edu>
…w debug logs

Signed-off-by: Narek Galstyan <narekg@berkeley.edu>
The sphere() SQL functions were defined as 'SELECT ROW($1, $2)' which
returns a generic record type. WHPG (Greenplum/PostgreSQL 12.12) is
stricter about type matching in SQL function bodies and requires the
return value to match the declared composite type exactly.

This caused runtime errors:
  ERROR: return type mismatch in function declared to return
sphere_vector
  DETAIL: Final statement returns record instead of vector at column 1.

Fix by adding explicit casts: 'SELECT ROW($1, $2)::sphere_vector'

Signed-off-by: Narek Galstyan <narekg@berkeley.edu>
@usamoi usamoi merged commit 43bb3dc into tensorchord:main Mar 24, 2026
21 checks passed
@Ngalstyan4 Ngalstyan4 deleted the narek/pg12-fixes branch March 24, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants