Re: Error in Query Builder: multi-line sql

Поиск
Список
Период
Сортировка
От Colin Beckingham
Тема Re: Error in Query Builder: multi-line sql
Дата
Msg-id 4F5B62FC.1040903@start.ca
обсуждение исходный текст
Ответ на Re: Error in Query Builder: multi-line sql  (Guillaume Lelarge <guillaume@lelarge.info>)
Ответы Re: Error in Query Builder: multi-line sql  (Colin Beckingham <colbec@start.ca>)
Список pgadmin-support

On 03/10/2012 08:38 AM, Guillaume Lelarge wrote:
> On Fri, 2012-03-09 at 05:09 -0500, Colin Beckingham wrote:
>> [...]
>> select distinct on (mname, nname) mname, nname from grammar \
>>           inner join majors using (mid) \
>>           inner join minors using (nid) \
>>           inner join jxgp using (gid) \
>>           where jxgp.pid = 9
>>
>
> It seems hard to reproduce. Can you send me the tables's definition?
> (grammar, majors, minors, jxpg) It'll be easier and quicker for me than
> trying to figure out their definitions. Thanks.
>

OK here is some more detail:
In order to eliminate the possibility it was the definitions of my 
tables that are the issue, I tried this:

CREATE TABLE one
(  col1 integer,  col2 text
)
WITH (  OIDS=FALSE
);

now create table two identical to one above. I think the oids are 
irrelevant in this case. Neither table contains any data.

Use Kwrite (I also tried with text cut and paste from Libreoffice 
writer) to create text as follows:

sql = "select distinct on (one.col2) one.col2 \from one \inner join two \  using (col1)"

Now open QB and paste in the text from Kwrite, remove the \ chars and 
other non-sql in the text and try to run the query, which runs fine, it 
just does not have any rows, ok. You can probably just paste in the sql, 
but I wanted to reproduce the Python format.

Now we will crash the sql editor: with mouse highlight the opening 
parenthesis of "(one.col2" and try to delete it with a backspace key. QB 
editor becomes unusable. I find this is completely consistent on my system.

-- 
---
Colin Beckingham
613-454-5369
http://www.it4gh.com


В списке pgadmin-support по дате отправления:

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: feature request
Следующее
От: Colin Beckingham
Дата:
Сообщение: Re: Error in Query Builder: multi-line sql