Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sam/pgroonga deps #1105

Merged
merged 12 commits into from
Sep 13, 2024
Merged

Sam/pgroonga deps #1105

merged 12 commits into from
Sep 13, 2024

Conversation

samrose
Copy link
Contributor

@samrose samrose commented Aug 9, 2024

What kind of change does this PR introduce?

a comment on a PR #462 (comment) reported that in our 15.6 release, TokenMecab was no longer working on the pgroonga extension.

This PR restores that Tokenizer capability to the proonga extension, and adds the following test below, which will run on every PR going forward.

-- File: 0005-test_pgroonga_revised.sql

begin;
    -- Plan for 3 tests: extension, table, and index
    select plan(3);
    
    -- Create the PGroonga extension
    create extension if not exists pgroonga;
    
    -- -- Test 1: Check if PGroonga extension exists
    select has_extension('pgroonga', 'The pgroonga extension should exist.');
    
    -- Create the table
    create table notes(
        id integer primary key,
        content text
    );
    
    -- Test 2: Check if the table was created
    SELECT has_table('public', 'notes', 'The notes table should exist.');    
    -- Create the PGroonga index
    CREATE INDEX pgroonga_content_index
            ON notes
         USING pgroonga (content)
          WITH (tokenizer='TokenMecab');
    
    -- -- Test 3: Check if the index was created
    SELECT has_index('public', 'notes', 'pgroonga_content_index', 'The pgroonga_content_index should exist.');
    
    -- -- Cleanup (this won't affect the test results as they've already been checked)
    DROP INDEX IF EXISTS pgroonga_content_index;
    DROP TABLE IF EXISTS notes;
    
    -- Finish the test plan
    select * from finish();
rollback;

@samrose samrose requested a review from a team as a code owner August 9, 2024 16:17
@samrose samrose requested a review from pcnc August 9, 2024 16:18
nix/ext/pgroonga.nix Outdated Show resolved Hide resolved
@samrose samrose marked this pull request as draft August 17, 2024 22:33
@samrose samrose marked this pull request as ready for review September 12, 2024 13:44
@olirice
Copy link
Contributor

olirice commented Sep 12, 2024

@samrose lgtm, feel free to merge once the conflicts are resolved

@samrose samrose merged commit 5961293 into develop Sep 13, 2024
8 checks passed
@samrose samrose deleted the sam/pgroonga-deps branch September 13, 2024 18:10
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.

3 participants