<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Manuel,</p>
<p>QGIS already has built-in relation support (1:n and n:m) - they should support server side queries. Do you really need to write your own plugin? Are the built-in relations not good enough?</p>
<p>Andreas</p>
<p>On 2016-04-08 15:26, Manuel Hernández Martínez wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored --><!-- meta ignored -->
<div class="WordSection1">
<p class="MsoNormal"><span>Hi!<!-- o ignored --></span></p>
<p class="MsoNormal"><span>I'm developing a plugin for QGIS. When the user selects a feature, it queries a few other layers from Postgis to fill in a form with related data.<!-- o ignored --></span></p>
<p class="MsoNormal"><span>The queries are slow, unless I check the option to run queries server-side. After that, the queries run instantaneously. Yay!<!-- o ignored --></span></p>
<p class="MsoNormal"><span>However, if the layers are put in edit mode, the queries are slow again! :(<!-- o ignored --></span></p>
<p class="MsoNormal"><span>After checking the Postgis logs it seems that the run queries server-side option has no effect when the layers are in edit mode.<!-- o ignored --></span></p>
<p class="MsoNormal"><span>Does anyone know whether it is a known, well-founded limitation or a bug?<!-- o ignored --></span></p>
<p class="MsoNormal"><span><!-- o ignored --> </span></p>
<p class="MsoNormal"><span>Regards, Manuel<!-- o ignored --></span></p>
<p class="MsoNormal"><span><!-- o ignored --> </span></p>
<div class="MsoNormal" style="text-align: center;" align="center"><hr align="center" size="2" width="100%" /></div>
<p class="MsoNormal" style="text-align: justify;"><strong><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333; mso-fareast-language: ES;">Manuel Hernández Martínez</span></strong><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333; mso-fareast-language: ES;"> </span><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333; mso-fareast-language: ES;"><!-- o ignored --></span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; mso-fareast-language: ES;"><a href="mailto:mhernandezm@agenciamedioambienteyagua.es"><span style="color: blue;">mhernandezm@agenciamedioambienteyagua.es</span></a></span><span style="font-size: 9.0pt; mso-fareast-language: ES;"> </span><span style="font-size: 9.0pt; mso-fareast-language: ES;"><!-- o ignored --></span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; mso-fareast-language: ES;"> <!-- o ignored --></span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; mso-fareast-language: ES;">Agencia de Medio Ambiente y Agua de Andalucía. </span><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; mso-fareast-language: ES;"><!-- o ignored --></span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="mso-fareast-language: ES;"><a title="http://www.egmasa.es/" href="http://www.agenciamedioambienteyagua.es/"><span style="font-size: 9.0pt; color: blue;">http://www.agenciamedioambienteyagua.es</span></a></span><span style="font-size: 9.0pt; color: blue; mso-fareast-language: ES;"> </span><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: blue; mso-fareast-language: ES;"><!-- o ignored --></span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; mso-fareast-language: ES;">Subdirección de Tecnologías de la Información</span><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333; mso-fareast-language: ES;">.<!-- o ignored --></span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333; mso-fareast-language: ES;">Red de Información Ambiental de Andalucía, REDIAM. </span><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333; mso-fareast-language: ES;"><!-- o ignored --></span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; color: #333333; mso-fareast-language: ES;"> <!-- o ignored --></span></p>
<table class="MsoNormalTable" style="width: 473.2pt; border-collapse: collapse;" border="0" width="631" cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 11.25pt;">
<td style="width: 473.2pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 11.25pt;" colspan="2" valign="bottom" width="631">
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black; mso-fareast-language: ES;">Johan G. Gutenberg, 1. Isla de la Cartuja</span><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black; mso-fareast-language: ES;"><!-- o ignored --></span></p>
</td>
</tr>
<tr style="height: 11.25pt;">
<td style="width: 473.2pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 11.25pt;" colspan="2" valign="bottom" width="631">
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black; mso-fareast-language: ES;">41092 - SEVILLA, Sevilla. (Spain)</span><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black; mso-fareast-language: ES;"><!-- o ignored --></span></p>
</td>
</tr>
<tr style="height: 11.25pt;">
<td style="width: 473.2pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 11.25pt;" colspan="2" valign="bottom" width="631"> </td>
</tr>
<tr style="height: 10.15pt;">
<td style="width: 27.65pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 10.15pt;" valign="bottom" width="37">
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; color: black; mso-fareast-language: ES;">Tel: </span><span style="font-size: 9.0pt; color: black; mso-fareast-language: ES;"><!-- o ignored --></span></p>
</td>
<td style="width: 445.55pt; padding: 0cm 0cm 0cm 0cm; height: 10.15pt;" valign="bottom" width="594">
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black; mso-fareast-language: ES;">+34 955 26 00 00 / +34 902 52 51 00</span><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black; mso-fareast-language: ES;"><!-- o ignored --></span></p>
</td>
</tr>
<tr style="height: 10.15pt;">
<td style="width: 27.65pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 10.15pt;" valign="bottom" width="37">
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; color: black; mso-fareast-language: ES;">Fax: </span><span style="font-size: 9.0pt; color: black; mso-fareast-language: ES;"><!-- o ignored --></span></p>
</td>
<td style="width: 445.55pt; padding: 0cm 0cm 0cm 0cm; height: 10.15pt;" valign="bottom" width="594">
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black; mso-fareast-language: ES;">+34 955 04 46 10</span><span style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black; mso-fareast-language: ES;"><!-- o ignored --></span></p>
</td>
</tr>
<tr style="height: 5.65pt;">
<td style="width: 27.65pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 5.65pt;" valign="bottom" width="37"> </td>
<td style="width: 445.55pt; padding: 0cm 0cm 0cm 0cm; height: 5.65pt;" valign="top" width="594"> </td>
</tr>
<tr style="height: 3.5pt;">
<td style="width: 473.2pt; border: none; border-bottom: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 3.5pt;" colspan="2" valign="bottom" width="631">
<p class="MsoNormal" style="text-align: justify;"><strong><span style="font-size: 9.0pt; color: #006600; mso-fareast-language: ES;">En la medida de lo posible, evite imprimir este correo. </span></strong><strong><span style="font-size: 9.0pt; color: #006600; mso-fareast-language: ES;"><!-- o ignored --></span></strong></p>
</td>
</tr>
<tr style="height: 3.5pt;">
<td style="width: 473.2pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 3.5pt;" colspan="2" valign="top" width="631">
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 9.0pt; color: black; mso-fareast-language: ES;">Este correo electrónico y los documentos que en él se puedan adjuntar, contiene información de carácter confidencial dirigida exclusivamente a su/s destinatario/s. Si Usted no es el destinatario de este mensaje, le ruego que lo destruya sin hacer copia digital o física, comunicando por correo electrónico, fax o teléfono a la Agencia de Medio Ambiente y Agua de Andalucía la recepción del mismo. Así mismo, queda expresamente prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita de la Agencia de Medio Ambiente y Agua de Andalucía. </span><span style="font-size: 9.0pt; color: black; mso-fareast-language: ES;"><!-- o ignored --></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="mso-fareast-language: ES;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><!-- o ignored --> </p>
</div>
<!-- html ignored --><br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br /> Qgis-developer mailing list<br /><a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br /> List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br /> Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
</blockquote>
<p> </p>
<div> </div>
</body></html>