In another app I can do:

        query = "akb_articles.tsv@@'simple','%'" % request.search_for

and then

        form = SQLFORM.grid(query)

or another variation:

        query = "akb_articles.tsv@@to_tsquery('simple', '%s')" % ss

or something like this:

l = db("akb_articles.tsv@@'kerkreg | (church & (polity |
government))'").select(db.akb_articles.title)


but all these variations in the present application result in the same
error I get the correct result in psql:

l = db("rauthor.addressfulltext@@'simple', 'south & africa'").select()
l = db("rauthor.addressfulltext@@to_tsquery('simple', 'south &
africa')").select()
l = db("rauthor.addressfulltext@@'South & Africa'").select()

Regards
Johann


On 18 April 2013 13:55, Anthony <abasta...@gmail.com> wrote:

> For me, db("rauthor.addressfulltext@@'**south & africa'").select()
> results in "SyntaxError: Set: no tables selected" because the query is a
> string and no fields were passed to .select().
>
> Anthony
>
>
> On Thursday, April 18, 2013 7:46:42 AM UTC-4, Johann Spies wrote:
>>
>> In psql I can do:
>>
>> select * from isi.rauthor A
>> where
>> A.addressfulltext@@'south & africa'
>>
>>
>> but the following
>>
>>  l = db("rauthor.addressfulltext@@'**south & africa'").select()
>>
>> results in
>>
>> TypeError: %d format: a number is required, not NoneType
>>
>>
>> Why?
>>
>> Model:
>>
>> from gluon.dal import SQLCustomType
>> tsv = SQLCustomType(
>>     type ='text',
>>     native='tsvector' )
>> ...
>>   Field('addressfulltext',type=**tsv),
>>
>>
>> Regards
>> Johann
>> --
>> Because experiencing your loyal love is better than life itself,
>> my lips will praise you.  (Psalm 63:3)
>>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to