From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: ob-sql company Date: Tue, 02 Jul 2019 19:08:47 +1000 Message-ID: <87v9wkx0ps.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33255) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiEmo-0005bG-E1 for emacs-orgmode@gnu.org; Tue, 02 Jul 2019 05:09:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiEmn-0002p4-9l for emacs-orgmode@gnu.org; Tue, 02 Jul 2019 05:09:14 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:38809) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hiEmj-0002dp-AM for emacs-orgmode@gnu.org; Tue, 02 Jul 2019 05:09:11 -0400 Received: by mail-pg1-x543.google.com with SMTP id z75so7380274pgz.5 for ; Tue, 02 Jul 2019 02:08:53 -0700 (PDT) Received: from tim-desktop (124-169-130-87.dyn.iinet.net.au. [124.169.130.87]) by smtp.gmail.com with ESMTPSA id y12sm17540578pfn.187.2019.07.02.02.08.50 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 02:08:51 -0700 (PDT) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Ag Ibragimov writes: > I've been using ob-sql to query DBs right from Org-mode and I love it. The only thing I could wish for is auto-completion. Does anyone know if it is possible at all to make it work so Company would show possible table/column names? That would be huge and then I wouldn't have to use external tools like Postico. as far as I'm aware, this is not possible. The challenge is in dealing with the different databases - there would need to be some sort of query layer which was able to interrogate whatever mechanism the database uses as its data dictionary to find names of schemas, tables, views, functions, indexes and then columns in those tables, view, indexes etc. Oviously, it can be done as this is what tools like dbeaver, pgAdmin, sqlDeveloper etc all do. >From memory, there have been some modes which a db specific that attempt to do this sort of thing (I seem tor recall there was one for Oracle sqlplus). -- Tim Cross