[Qgis-developer] Error for postgres's provider when table(statement SELECT ) is outside public's schema

Ricardo Filipe Soares Garcia da ricardo.garcia.silva at gmail.com
Tue Dec 14 11:41:52 EST 2010


Hi Guiseppe, Luiz

I have to do some more checking to be sure, but I think this problem
is happening with both plugins. I haven't got a postgis database at
hand right now, but with my home testing set I was getting the same
error (something about cursor states lost) with both 'custom db query'
and 'rt sql layer' plugins.
I'll investigate later.

I didn't realize it might have something to do with the tables not
being in the 'public' schema until Luiz brought it up. All my testing
tables are indeed out of the 'public' schema.

If the problem is happening on both plugins, could this mean it is
something wrong with the underlying implementation?
I haven't copied code from the 'rt sql layer plugin', so it is likely
that the code is different. However, the QgsDataSourceURI.uri() must
be returning a similar value for it to work on both plugins...

Regarding the trac issues, sorry for the confusion. I am not very
knowledgeable about the main trac and the new plugins trac. Please
feel free to use the bug report in whatever way you see fit, be it
closing as invalid or whatever ;)


On Tue, Dec 14, 2010 at 4:13 PM, Giuseppe Sucameli <sucameli at faunalia.it> wrote:
> Hi Luiz and Ricardo,
>
> On Tue, Dec 14, 2010 at 1:04 PM, Luiz Motta <motta.luiz at gmail.com> wrote:
>>
>> The author of provider told me about this problem, see ticket
>> (https://trac.osgeo.org/qgis/ticket/3329).
>
> to Luiz: as Ricardo wrote, he is the author of the plugin
> (CustomDatabaseQuery),
> not the author of the provider at all.
> BTW, I'm the author of both the patches for executing a custom query with
> postgres and spatialite provider, so I'm one of the guys you're searching
> for :)
>
> to Ricardo: the ticket told about an "Error for postgres's provider", not
> custom
> database query plugin issue.
> Furthermore, the QGis trac is not for plugins' issues, except for those that
> are
> in trunk. For this reason we're working to create a plugins trac.
>
> If you're sure the issue is only related to your plugin source code and not
> to the
> qgis functions called in your code, you should close the ticket as invalid.
>
>> SELECT
>>   l.id AS gid, l.the_geom AS the_geom
>> FROM gis.tl_20101117_101056_limite l
>
> Doesn't anyone confirm that it's a provider's issue, not just a plugin
> issue??
> Please, could you try to execute the same query using the RT Sql Layer
> plugin,
> in order to confirm the provider issue?
>
> Thanks a lot.
> Cheers.
>
>>
>> Please inform about your enviroment.
>> It  can be util for understand what is happened.
>> Regards,
>> Luiz Motta
>>
>>
>>
>>
>> 2010/12/14 Giuseppe Sucameli <sucameli at faunalia.it>
>>>
>>> Hi Luiz,
>>>
>>> On Tue, Dec 14, 2010 at 2:43 AM, Luiz Motta <motta.luiz at gmail.com> wrote:
>>>>
>>>> I am testing the 'Custom database query' plugins, where, i use layers
>>>> outside public's schema.
>>>> The plugin create the layer, but, before, i receive the message error
>>>> about cursor od database.
>>>> If the layers are inside public's schema not appear message.
>>>> The one ticket is open, number 3329.
>>>
>>> I'm unable to reproduce it, both 'Custom database query' and 'RT Sql
>>> Layer' plugins
>>> seems to work with tables not in the public schema.
>>> Maybe does your layer contain invalid geometries?
>>>
>>> Cheers.
>>>
>>> --
>>> Giuseppe Sucameli
>>>
>>
>
>
>
> --
> Giuseppe Sucameli
>
>



-- 
___________________________ ___ __
Ricardo Garcia Silva


More information about the Qgis-developer mailing list