Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sql-interactive-mode]

The tag has no usage guidance.

0
votes
1answer
16 views

How to run sql-postgres without password?

My PostgreSQL authenticates using Unix Domain Sockets (Trust Authentication). When I run psql I do not need a password to connect to the database. But when I run sql-postgres, I am always asked for a ...
2
votes
1answer
33 views

Shortcut to restart sql-postgres process from sql-mode buffer?

Is there a shortcut key or command in Emacs (25.x under Unbuntu 18.04 LTS) to restart the sql-postgres process? I need to quit and restart sql-postgres very often (for debugging purposes). Currently, ...
0
votes
0answers
95 views

Open multiple *SQL* buffers (same product)

I connect to postgres by placing the following in a file on a remote server, opening over tramp, and executing: (setq sql-connection-alist '((pool-my_db (sql-product 'postgres) ...
4
votes
1answer
148 views

sql-connect with Ivy

I've switched from helm to Ivy and mostly everything works, but today I noticed that connecting to databases with sql-connect doesn't work anymore. I have the following in the variable sql-connection-...
2
votes
0answers
88 views

How to abort a command executing in sqli-mode?

Whilst using a sqli buffer I accidentally ran a mahoosive query. What's the easiest way to abort it? I used sql-postgres to start the process.
8
votes
1answer
889 views

Is there a company backend for completion in sql-interactive-mode?

I'm using sql-interactive-mode, and I'm in need for a Company backends that will complete SQL keywords, and preferably, also column/table names of the used database. When looking around for any ...
0
votes
1answer
79 views

The function will not pass anything to a SQL process, when called. There is no error

I liked the interactivity of Clojure/Lisp, where you can see the result in the REPL. I tried to implement the same behaviour for SQL-mode. The idea is that when I do C-x C-e on the SQL-statemnt, I see ...
2
votes
2answers
1k views

How to change the indentation of major mode (SQL-mode)?

Configuration: Emacs 25.0.50 on Ubuntu 15.04. How to produce? Do emacs -Q, then M-x sql-mode. Paste the following in the buffer: SELECT SUM(T01.foobar) FROM db_foo.bar T01 WHERE T01.fooID = ...
2
votes
1answer
154 views

How do I make multiple buffers use a single sql connection?

I am using sql mode. Is there a way to connect multiple buffers to a single sql connection? When I try to connect an existing buffer to a database, it always creates a new connection instead of ...
1
vote
0answers
173 views

sql-connect: (setting-constant nil)

I am using latest Helm from MELPA on Emacs GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6) of 2015-09-11 When I issue sql-connect I see this: The only connection I have saved (in ...
5
votes
3answers
915 views

sql-send-paragraph results in mis-aligned headers

Anyone know how to fix this? I'm connecting to Postgres, and when I use a command like sql-send-paragraph to send a SQL query to the interactive *SQL* buffer, the headers are not aligned right. It's ...
0
votes
1answer
273 views

sql-mysql console with glitches

When I run sql-mysql, it gives me an unusable console: Note how the commands and results are misplaced. My emacs version is 24.5.1.
3
votes
0answers
89 views

Send custom commands via psql interface

When interacting with postgresql via Emacs sql-postgres, is it possible to write aliases or functions, to be able to type for example, databases instead of \l, when I want to list all databases?
0
votes
1answer
1k views

Trying to connect to a MySQL database using SQLi with no luck [closed]

Been trying to follow this guide to setting up SQLi http://truongtx.me/2014/08/23/setup-emacs-as-an-sql-database-client/ I use Customize Group SQL to set the parameters (host, username, etc.,) and ...
5
votes
1answer
2k views

Variables in Babel evaluation with SQL blocks

According to the org-mode manual, you can set variables in code blocks as follows: #+HEADERS: :var foo="blah" #+BEGIN_SRC elisp (message foo) #+END_SRC #+RESULTS: : blah However, when I try to do ...
4
votes
1answer
685 views

Why do sql-mode and sql-interactive-mode not highlight strings the same way?

Here is a screenshot showing the difference between sql-interactive-mode (top) and sql-mode (bottom). Why does the string not get highlighted properly in sql-interactive-mode? (Note - this also ...