From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gary Oberbrunner Subject: Re: sql can't export an empty table, gives error Date: Wed, 24 Dec 2014 09:55:34 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a11c33fccde764a050af77ba8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3nLf-0000SL-Mx for emacs-orgmode@gnu.org; Wed, 24 Dec 2014 09:55:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y3nLc-0007hA-Fx for emacs-orgmode@gnu.org; Wed, 24 Dec 2014 09:55:39 -0500 Received: from mail-lb0-f169.google.com ([209.85.217.169]:60172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3nLc-0007h4-1f for emacs-orgmode@gnu.org; Wed, 24 Dec 2014 09:55:36 -0500 Received: by mail-lb0-f169.google.com with SMTP id p9so6985676lbv.28 for ; Wed, 24 Dec 2014 06:55:35 -0800 (PST) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Orgmode Mailing List --001a11c33fccde764a050af77ba8 Content-Type: multipart/alternative; boundary=001a11c33fccde7646050af77ba6 --001a11c33fccde7646050af77ba6 Content-Type: text/plain; charset=UTF-8 On Tue, Dec 23, 2014 at 5:34 PM, Gary Oberbrunner wrote: > If you try to export this document: > > #+BEGIN_SRC sql :exports both > select 1 limit 0; > #+END_SRC > > It fails to export with an error in *Messages*: > user-error: Empty table - created default table > It also stops processing the document at that point. > (That SQL code produces no output but is not a SQL error.) > > I'd prefer if it would just leave that empty (missing) table out, and keep > going. Is there any way to do that? > Here's a simple patch to fix this, if people are interested. -- Gary --001a11c33fccde7646050af77ba6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On Tue, Dec 23, 2014 at 5:34 PM, Gary Oberbrunner <garyo@oberbrunner.c= om> wrote:
If you try to= export this document:

#+BEGIN_SRC sql :exports bot= h
=C2=A0select 1 limit 0;
#+END_SRC

It fails to export with an error in *Messages*:
=C2=A0user-= error: Empty table - created default table
It also stops proc= essing the document at that point.
(That SQL code produces no out= put but is not a SQL error.)

I'd prefer if it = would just leave that empty (missing) table out, and keep going.=C2=A0 Is t= here any way to do that?

= Here's a simple patch to fix this, if people are interested.
= =C2=A0
--
Gary
--001a11c33fccde7646050af77ba6-- --001a11c33fccde764a050af77ba8 Content-Type: application/octet-stream; name="0001-Allow-empty-table-creation-on-export-rather-than-giv.patch" Content-Disposition: attachment; filename="0001-Allow-empty-table-creation-on-export-rather-than-giv.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i42tohru0 RnJvbSBlNTZlYmZlNzcwMjkwODVjMmYxYWY0OWZlNmViOTQzMTkxYjhlMTg0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBHYXJ5IE9iZXJicnVubmVyIDxnYXJ5b0BnZW5hcnRzLmNvbT4K RGF0ZTogV2VkLCAyNCBEZWMgMjAxNCAwOTo1Mjo1NCAtMDUwMApTdWJqZWN0OiBbUEFUQ0hdIEFs bG93IGVtcHR5IHRhYmxlIGNyZWF0aW9uIG9uIGV4cG9ydCwgcmF0aGVyIHRoYW4gZ2l2aW5nCiBl cnJvci4KClRoaXMgaXMgdXNlZnVsIHdpdGggU1FMIHdoaWNoIGNhbiBwcm9kdWNlIG5vIHJlc3Vs dHMgc29tZXRpbWVzLgotLS0KIGxpc3Avb3JnLXRhYmxlLmVsIHwgMyArKy0KIDEgZmlsZSBjaGFu Z2VkLCAyIGluc2VydGlvbnMoKyksIDEgZGVsZXRpb24oLSkKCmRpZmYgLS1naXQgYS9saXNwL29y Zy10YWJsZS5lbCBiL2xpc3Avb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