How to replace to_tsquery by phraseto_tsquery in PostgreSQL? For word suggestion when do search.
I can query like
select title from test where ts_filter(tsv, '{A}') @@ to_tsquery('english_nostop', 'god&lt;-&gt;o' || ':*')

# tsv is something like to_tsvector('english_nostop', test.title)

The &lt;-&gt; was something like pattern = pattern.replace(' ', '&lt;-&gt;'). That may have some problem when pattern contain &lt;.  Thought we can remove such char.
Combine tsquery don't work here. I can't find away to do to_tsquery(':*')
But how to use phraseto_tsquery to replace  to_tsquery ? And still can have :* work?

After @Laurenz Albe answer.  phraseto_tsquery can't do this.
May be I need give more detail. Why I want to use phraseto_tsquery.
I use the
CREATE TEXT SEARCH DICTIONARY english_stem_nostop (
    Template = snowball
    , Language = english
);

CREATE TEXT SEARCH CONFIGURATION public.english_nostop ( COPY = pg_catalog.english );
ALTER TEXT SEARCH CONFIGURATION public.english_nostop
ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, hword, hword_part, word WITH english_stem_nostop;

To keep stop words can be searched.
But I need to change pattern like this in python:
pattern = info[&quot;pattern&quot;]
replace_punctuation = str.maketrans(string.punctuation, ' ' * len(string.punctuation))
pattern = pattern.translate(replace_punctuation)
replace_space = pattern.replace(&quot; &quot;, '&lt;-&gt;')

You can see I replace punctuation by ' '. Then replace ' ' with &lt;-&gt;.
I came up this question. Because I wonder can I don't transform pattern in python and just use psql to transform pattern.
Why need both ':*' and &lt;-&gt;. here is a example:
select title from book where ts_filter(tsv_nostop, '{A}') @@ to_tsquery('english_nostop', 'how&lt;-&gt;t'||':*')
except
select title from book where ts_filter(tsv_nostop, '{A}') @@ to_tsquery('english_nostop', 'how&lt;-&gt;t');

This will show  title contain how to. When user input how t. We want pop up some title.
You cannot do that with phraseto_tsquery.
The lower-level functions provide more features that you cannot get with phraseto_tsquery or websearch_to_tsquery.