Обсуждение: Emacs sql-postgres (please, sorry for question not about PostgreSQL).

Поиск
Список
Период
Сортировка

Emacs sql-postgres (please, sorry for question not about PostgreSQL).

От
Dmitriy Igrishin
Дата:
Hello all Emacs users!<br /><br />I am using Emacs recently. I love sql-mode, to use with PostgreSQL,<br />but I have
problemswith it.<br />When my SQL file (or buffer) are small (50-100 lines) I can send<br />it to SQLi buffer without
anyproblems. But when I working with<br /> large SQL file (e.g. complex database model, thousands of lines)<br />and
sendit to SQLi buffer it does not work properly. Something<br />going on and in SQLi buffer (psql) I see incomplete
SQL<br/>statement, for example:<br />     super=# super'# super'# super'# super'#<br />It seems to single quote was not
closed.But SQL is absolutely<br />correct and loads fine when I load it from file directly from psql.<br />I think, the
problemwith Emacs buffers... Please, help!<br /><br />And please sorry, for question not about PostgreSQL...<br /><br
/>Regards,<br/><font color="#888888">Dmitriy Igrishin</font> 

Re: Emacs sql-postgres (please, sorry for question not about PostgreSQL).

От
Tom Lane
Дата:
Dmitriy Igrishin <dmitigr@gmail.com> writes:
> I am using Emacs recently. I love sql-mode, to use with PostgreSQL,
> but I have problems with it.
> When my SQL file (or buffer) are small (50-100 lines) I can send
> it to SQLi buffer without any problems. But when I working with
> large SQL file (e.g. complex database model, thousands of lines)
> and send it to SQLi buffer it does not work properly. Something
> going on and in SQLi buffer (psql) I see incomplete SQL
> statement, for example:
>     super=# super'# super'# super'# super'#
> It seems to single quote was not closed. But SQL is absolutely
> correct and loads fine when I load it from file directly from psql.
> I think, the problem with Emacs buffers... Please, help!

Might or might not be related, but I've seen psql lock up when I try to
paste more than a thousand or two characters into it via X11
copy-and-paste.  You might find that disabling libreadline (option -n
to psql) helps.
        regards, tom lane


Re: Emacs sql-postgres (please, sorry for question not about PostgreSQL).

От
Pavel Stehule
Дата:
Hello

try to look on http://www.postgres.cz/index.php/PostgreSQL_SQL_Tricks#Terminal.27s_configuration

Regards
Pavel Stehule

2010/3/18 Dmitriy Igrishin <dmitigr@gmail.com>:
> Hello all Emacs users!
>
> I am using Emacs recently. I love sql-mode, to use with PostgreSQL,
> but I have problems with it.
> When my SQL file (or buffer) are small (50-100 lines) I can send
> it to SQLi buffer without any problems. But when I working with
> large SQL file (e.g. complex database model, thousands of lines)
> and send it to SQLi buffer it does not work properly. Something
> going on and in SQLi buffer (psql) I see incomplete SQL
> statement, for example:
>     super=# super'# super'# super'# super'#
> It seems to single quote was not closed. But SQL is absolutely
> correct and loads fine when I load it from file directly from psql.
> I think, the problem with Emacs buffers... Please, help!
>
> And please sorry, for question not about PostgreSQL...
>
> Regards,
> Dmitriy Igrishin


Re: Emacs sql-postgres (please, sorry for question not about PostgreSQL).

От
Pavel Stehule
Дата:
2010/3/18 Tom Lane <tgl@sss.pgh.pa.us>:
> Dmitriy Igrishin <dmitigr@gmail.com> writes:
>> I am using Emacs recently. I love sql-mode, to use with PostgreSQL,
>> but I have problems with it.
>> When my SQL file (or buffer) are small (50-100 lines) I can send
>> it to SQLi buffer without any problems. But when I working with
>> large SQL file (e.g. complex database model, thousands of lines)
>> and send it to SQLi buffer it does not work properly. Something
>> going on and in SQLi buffer (psql) I see incomplete SQL
>> statement, for example:
>>     super=# super'# super'# super'# super'#
>> It seems to single quote was not closed. But SQL is absolutely
>> correct and loads fine when I load it from file directly from psql.
>> I think, the problem with Emacs buffers... Please, help!
>
> Might or might not be related, but I've seen psql lock up when I try to
> paste more than a thousand or two characters into it via X11
> copy-and-paste.  You might find that disabling libreadline (option -n
> to psql) helps.
>

This behave is same without external copy/paste. SQL support in emacs
is really great with some issues - like this or missing autocomplete.

Pavel

>                        regards, tom lane
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>


Re: Emacs sql-postgres (please, sorry for question not about PostgreSQL).

От
"Hiltibidal, Rob"
Дата:
<div class="Section1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">I recommend switching to aqua data studio</span><p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"> </span><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">I can query mysql, postgres, db2, oracle with the same tool</span><p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"> </span><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"> </span><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"> </span><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p
class="MsoNormal"><b><spanstyle="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org]<b>On Behalf Of </b>Dmitriy Igrishin<br /><b>Sent:</b> Thursday, March 18, 2010
4:44PM<br /><b>To:</b> postgres list<br /><b>Subject:</b> [SQL] Emacs sql-postgres (please, sorry for question not
aboutPostgreSQL).</span></div><p class="MsoNormal"> <p class="MsoNormal">Hello all Emacs users!<br /><br /> I am using
Emacsrecently. I love sql-mode, to use with PostgreSQL,<br /> but I have problems with it.<br /> When my SQL file (or
buffer)are small (50-100 lines) I can send<br /> it to SQLi buffer without any problems. But when I working with<br />
largeSQL file (e.g. complex database model, thousands of lines)<br /> and send it to SQLi buffer it does not work
properly.Something<br /> going on and in SQLi buffer (psql) I see incomplete SQL<br /> statement, for example:<br />
   super=# super'# super'# super'# super'#<br /> It seems to single quote was not closed. But SQL is absolutely<br />
correctand loads fine when I load it from file directly from psql.<br /> I think, the problem with Emacs buffers...
Please,help!<br /><br /> And please sorry, for question not about PostgreSQL...<br /><br /> Regards,<br /><span
style="color:#888888">DmitriyIgrishin</span></div><p><pre wrap="wrap">PRIVILEGED AND CONFIDENTIAL 
This email transmission contains privileged and confidential information intended only for the use of the individual or
entitynamed above.  If the reader of the email is not the intended recipient or the employee or agent responsible for
deliveringit to the intended recipient, you are hereby notified that any use, dissemination or copying of this email
transmissionis strictly prohibited by the sender.  If you have received this transmission in error, please delete the
emailand immediately notify the sender via the email return address or mailto:postmaster@argushealth.com.  Thank you. 



</pre>