unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Mauger via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Stefan Kangas <stefan@marxist.se>,
	47358@debbugs.gnu.org, Jean Louis <bugs@gnu.support>
Subject: bug#47358: 28.0.50; sql-list-tables: quotes are cumbersome, no need for it; include history
Date: Tue, 05 Jul 2022 01:17:59 +0000	[thread overview]
Message-ID: <RPPFwCrPX9Kj4lALUobDOQjdi0Ct0B8Jfl9ZWF5IsKgqKHaD7bOZ51DNS3MyxSJoih_ixjbfJ7oeBpK17pJ_egUF4P4ogjxwqaYFUovXpIU=@protonmail.com> (raw)
In-Reply-To: <87sfnr9snr.fsf@gnus.org>

Lars, your analysis was correct--they value is merely inserted into whatever command the dialect uses to display the table structure and relies upon the underlying command interpreter's rules.  I understand the desire to not make typing of the double quotes required even if they are required in the underlying command then being consistent with what the underlying parser requires is not particularly onerous. The handling of the double quotes becomes a challenge when the underlying cli does not accept the same table-name syntax as the "list tables" command requires.

I am playing around with completion (and the insertion of enclosing dquotes when required) in code and in the minibuffer but that'll be a little while before that is ready. I'll take a look at the smaller bugs first and move on to this. I do use sql-mode every day (I was a predominantly Oracle user for many years, but PostgreSQL and a little MS SQL Server and SQLite have become my current emphasis).

--
MICHAEL@MAUGER.COM // FSF and SFConservancy // GNU Emacs sql.el maintainer

------- Original Message -------
On Sunday, June 26th, 2022 at 2:38 PM, Lars Ingebrigtsen <larsi@gnus.org> wrote:


> Stefan Kangas stefan@marxist.se writes:
>
> > Jean Louis bugs@gnu.support writes:
> >
> > > When executing C-c C-l t in sql-interactive-mode then tables are
> > > completed with quotes like "activities" instead of just activities.
> > >
> > > It would be good not to use quotes, it is more usable that
> > > way. Internally the table could require quotes to be called, but for
> > > user to complete a string or name of table should not be necessary.
> > >
> > > Additionally I propose to include history for the function
> > > sql-list-tables as calling tables' definitions may be frequent with some
> > > users, and other mini buffer entries are not relevant to it.
> >
> > I'm copying in the sql.el maintainer here. Michael, could you please take a
> > look at the above feature request?
>
>
> I'm not very familiar with sql.el, but if I read the code correctly,
> `C-c C-l t' just outputs the data the SQL server spits back at us? So
> if you're using PostgreSQL, I guess that means that that's how
> PostgreSQL formats the CREATE TABLE statement.
>
> But I may be mistaken -- perhaps Michael has some comments here.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2022-07-05  1:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24  8:01 bug#47358: 28.0.50; sql-list-tables: quotes are cumbersome, no need for it; include history Jean Louis
2021-10-21 21:03 ` Stefan Kangas
2022-06-26 18:38   ` Lars Ingebrigtsen
2022-07-05  1:17     ` Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]

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='RPPFwCrPX9Kj4lALUobDOQjdi0Ct0B8Jfl9ZWF5IsKgqKHaD7bOZ51DNS3MyxSJoih_ixjbfJ7oeBpK17pJ_egUF4P4ogjxwqaYFUovXpIU=@protonmail.com' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=47358@debbugs.gnu.org \
    --cc=bugs@gnu.support \
    --cc=larsi@gnus.org \
    --cc=mmauger@protonmail.com \
    --cc=stefan@marxist.se \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).