[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interacting with PostgreSQL
From: |
Tim Landscheidt |
Subject: |
Re: Interacting with PostgreSQL |
Date: |
Tue, 24 Nov 2020 20:42:45 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
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.
- Re: Interacting with PostgreSQL, (continued)
- Re: Interacting with PostgreSQL, Jean Louis, 2020/11/21
- Re: Interacting with PostgreSQL, Tim Landscheidt, 2020/11/24
- Re: Interacting with PostgreSQL, Jean Louis, 2020/11/24
- Re: Interacting with PostgreSQL, Tim Landscheidt, 2020/11/25
- Re: Interacting with PostgreSQL, Jean Louis, 2020/11/25
- Re: Interacting with PostgreSQL, Tim Landscheidt, 2020/11/25
- Re: Interacting with PostgreSQL, Jean Louis, 2020/11/26
- Re: Interacting with PostgreSQL, Tim Landscheidt, 2020/11/29
- Re: Interacting with PostgreSQL, Jean Louis, 2020/11/30
Re: Interacting with PostgreSQL, Marcin Borkowski, 2020/11/22