From: Tim Landscheidt <tim@tim-landscheidt.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Interacting with PostgreSQL
Date: Tue, 24 Nov 2020 20:42:45 +0000 [thread overview]
Message-ID: <87wnyav64a.fsf@passepartout.tim-landscheidt.de> (raw)
In-Reply-To: 874klhgjpk.fsf@mbork.pl
Marcin Borkowski <mbork@mbork.pl> wrote:
> not sure if this will help, but I sometimes use Org-mode to interact
> with Postgres:
> http://mbork.pl/2020-03-09_Using_Org-mode_as_a_PostgreSQL_client
> […]
I sometimes do as well, mainly for read-only queries, and it
has the very incentive benefit that one can add a bunch of
DONE tasks to the daily agenda view :-). But for data mung-
ing I have two reservations:
- AFAICT, there is no way to execute the code block while
editing. So I have to either C-c ', edit, C-c ', C-c C-c,
check the result, lather, rinse, repeat, finally uncomment
COMMIT and C-c C-c, or edit the query "inline" which can
be dangerous when pasting bulk data or replacing text be-
cause it is easy to miss where the query ends.
- For non-idempotent queries (say, incrementing a column
once for all rows), there are no safeguards against acci-
dentally re-executing the query in the future. So I would
have to edit the query and evaluate the code block for
testing, then uncomment the COMMIT, evaluate the code
block, then comment the COMMIT again to be on the safe
side.
Tim
P. S.: Just noticed that apparently :prologue and :epilogue
are ignored in ob-sql. I'll file a report for that.
next prev parent reply other threads:[~2020-11-24 20:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-21 23:51 Interacting with PostgreSQL Tim Landscheidt
2020-11-22 1:33 ` Jean Louis
2020-11-24 23:14 ` Tim Landscheidt
2020-11-25 4:18 ` Jean Louis
2020-11-25 10:37 ` Tim Landscheidt
2020-11-25 14:25 ` Jean Louis
2020-11-25 17:08 ` Tim Landscheidt
2020-11-27 1:40 ` Jean Louis
2020-11-30 3:12 ` Tim Landscheidt
2020-11-30 9:12 ` Jean Louis
2020-11-22 21:33 ` Marcin Borkowski
2020-11-24 20:42 ` Tim Landscheidt [this message]
2020-11-27 2:01 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wnyav64a.fsf@passepartout.tim-landscheidt.de \
--to=tim@tim-landscheidt.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).