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

x/pkgsite: pq: function websearch_to_tsquery(unknown) does not exist #43154

Closed
oiooj opened this issue Dec 12, 2020 · 4 comments
Closed

x/pkgsite: pq: function websearch_to_tsquery(unknown) does not exist #43154

oiooj opened this issue Dec 12, 2020 · 4 comments
Labels
FrozenDueToAge pkgsite WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@oiooj
Copy link
Member

oiooj commented Dec 12, 2020

I inited a DB and test pkgsite but when I search a keyword I got an error, a pg function not found: websearch_to_tsquery(unknown).

2020/12/12 23:07:54 Error: fetchSearchPage(ctx, db, "http"): DB.Search(ctx, "http", 10, 0): "deep" search failed: DB running query local-6: pq: function websearch_to_tsquery(unknown) does not exist
2020/12/12 23:07:54 Info: 500 /search map[isRobot:false requestType:request end]

image

I inited the database using migrations/*.up.sql files, Did I miss something?
Is there any guide to run this service for developing. Thanks.

/cc @julieqiu

@oiooj oiooj added the pkgsite label Dec 12, 2020
@gopherbot gopherbot added this to the Unreleased milestone Dec 12, 2020
@julieqiu julieqiu removed their assignment Dec 12, 2020
@jba
Copy link
Contributor

jba commented Dec 14, 2020

That is not one of our functions; it's built in to Postgres.

Try this from psql or other DB client:

select websearch_to_tsquery('foo'); 

If that fails, perhaps you have an older version of Postgres? We're on version 11.

If it succeeds, maybe there's a problem with the argument. Can you figure out what's being passed to the function?

@jba
Copy link
Contributor

jba commented Dec 14, 2020

Is there any guide to run this service for developing.

https://go.googlesource.com/pkgsite/+/master/doc/postgres.md is the best we have at the moment. Enhancements welcome.

@jba jba added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Dec 14, 2020
@jba jba modified the milestones: Unreleased, pkgsite/unplanned Dec 14, 2020
@oiooj
Copy link
Member Author

oiooj commented Dec 15, 2020

Yes , this function added in PostgreSQL 11, doc: https://www.postgresql.org/docs/11/functions-textsearch.html
Thanks @jba

@oiooj oiooj closed this as completed Dec 15, 2020
@gopherbot
Copy link

Change https://golang.org/cl/278292 mentions this issue: doc: clarify that Postgres v11 or higher is required

gopherbot pushed a commit to golang/pkgsite that referenced this issue Dec 15, 2020
See golang/go#43154, where an older version was missing a function we
use.

Change-Id: I268b5ded629bf10504bb2418843978f21c15f483
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/278292
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
@golang golang locked and limited conversation to collaborators Dec 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge pkgsite WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants