Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [sql-interactive-mode]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Use comint with non-interactive CLI tools

Is it possible to run a CLI tool (via sql-* comint-based mode) that checks isatty() and immediately exits because the stdin is empty? Maybe it is possible to force comint (or SQL mode) to run the tool ...
Max Arnold's user avatar
0 votes
0 answers
42 views

sql-interactive-mode get product name for the buffer

I have 2 connections to different servers through sql interactive mode: (setq sql-connection-alist '((mysql_server (sql-product 'mysql) (sql-server "server1") (sql-user &...
user4035's user avatar
  • 1,069
2 votes
2 answers
340 views

Storing Database Authentication Details Securely

(Note: I would normally use gpg versions of these files but for debugging I've scrapped gpg until I can get it working without encrypting!) I'd like to store my username/password credentials securely ...
Phil's user avatar
  • 535
1 vote
0 answers
294 views

Postgres sql prompt

I have connected to my remote postgres db via: https://stackoverflow.com/a/65310225/5065796 I am able to query and interact just fine. I cannot, however, see the prompt. It's just a blank line. It ...
Lorem Ipsum's user avatar
  • 4,517
2 votes
1 answer
859 views

How to send a string to the SQLi (sql-mode/sql-interactive-mode) buffer after processing?

How can I send a selected region in the sql-mode buffer to an external shell command and let the result be displayed in the sql-interactive-mode buffer (REPL)? For example, normally, if I select a ...
tinlyx's user avatar
  • 1,364
2 votes
1 answer
2k views

How to use a hyphenated user-name with postgres in sql-interactive-mode?

I have the following configuration in emacs init files to set a variable (user) to the current Unix login user: (setq sql-postgres-login-params `((user :default ,user-login-name) (...
tinlyx's user avatar
  • 1,364
1 vote
1 answer
318 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 ...
ceving's user avatar
  • 1,378
3 votes
1 answer
217 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, ...
tinlyx's user avatar
  • 1,364
0 votes
0 answers
229 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) ...
EoghanM's user avatar
  • 205
4 votes
1 answer
271 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-...
flooose's user avatar
  • 521
3 votes
0 answers
146 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.
cammil's user avatar
  • 509
10 votes
1 answer
2k 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 ...
ReneFroger's user avatar
  • 3,880
0 votes
1 answer
116 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 ...
ReneFroger's user avatar
  • 3,880
4 votes
2 answers
2k 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 = ...
ReneFroger's user avatar
  • 3,880
2 votes
1 answer
254 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 ...
mandark's user avatar
  • 159
1 vote
0 answers
286 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 ...
Manuel Uberti's user avatar
7 votes
3 answers
2k 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 ...
Rob N's user avatar
  • 649
0 votes
1 answer
410 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.
Jesse's user avatar
  • 1,994
3 votes
0 answers
111 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?
Nsukami _'s user avatar
  • 6,531
0 votes
1 answer
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 ...
emlprime's user avatar
6 votes
1 answer
3k 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 ...
Sohail's user avatar
  • 503
4 votes
1 answer
828 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 ...
Trevoke's user avatar
  • 2,450