BUG #17917: to_tsquery syntax error

Started by PG Bug reporting formalmost 3 years ago3 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 17917
Logged by: Cyrus Lozano
Email address: cyloz28@gmail.com
PostgreSQL version: 13.10
Operating system: Linux - Fedora 38
Description:

select to_tsquery('lowercase', plainto_tsquery('lowercase', 'test')::text ||
':*');

the above query runs successfully in Windows but got an error in Fedora 38:
ERROR: syntax error in tsquery: ":*"

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: BUG #17917: to_tsquery syntax error

PG Bug reporting form <noreply@postgresql.org> writes:

select to_tsquery('lowercase', plainto_tsquery('lowercase', 'test')::text ||
':*');

the above query runs successfully in Windows but got an error in Fedora 38:
ERROR: syntax error in tsquery: ":*"

Works for me, after substituting a text search configuration name that
I had installed:

=# select to_tsquery('english', plainto_tsquery('english', 'test')::text ||
':*');
to_tsquery
------------
'test':*
(1 row)

I think you mistyped something in the Fedora case. The error message
is pretty clear that what to_tsquery() got was only ':*'.

regards, tom lane

#3Cyrus Lozano
cyloz28@gmail.com
In reply to: Tom Lane (#2)
Re: BUG #17917: to_tsquery syntax error

Hi Tom,

Thanks for checking. I did not notice that somehow, my flyway scripts related to the text search configuration failed, thus the error.

Please disregard this issue and apologies for the inconvenience.

Regards,

Cyrus Lozano

Show quoted text

On 3 May 2023, at 9:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

PG Bug reporting form <noreply@postgresql.org> writes:

select to_tsquery('lowercase', plainto_tsquery('lowercase', 'test')::text ||
':*');

the above query runs successfully in Windows but got an error in Fedora 38:
ERROR: syntax error in tsquery: ":*"

Works for me, after substituting a text search configuration name that
I had installed:

=# select to_tsquery('english', plainto_tsquery('english', 'test')::text ||
':*');
to_tsquery
------------
'test':*
(1 row)

I think you mistyped something in the Fedora case. The error message
is pretty clear that what to_tsquery() got was only ':*'.

regards, tom lane