From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.tangents Subject: Re: guile-pg fatal error Date: Wed, 21 Oct 2020 12:15:36 +0300 Message-ID: References: <20160306180832.GA17572@protected.rcdrun.com> <873629rp97.fsf@gnuvola.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15936"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ (1036f0e) (2020-10-18) Cc: emacs-tangents@gnu.org To: Thien-Thi Nguyen Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Wed Oct 21 11:16:18 2020 Return-path: Envelope-to: get-emacs-tangents@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVAEE-0003zL-K9 for get-emacs-tangents@m.gmane-mx.org; Wed, 21 Oct 2020 11:16:18 +0200 Original-Received: from localhost ([::1]:44038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVAED-0002Ak-Lj for get-emacs-tangents@m.gmane-mx.org; Wed, 21 Oct 2020 05:16:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVADq-00029h-CT for emacs-tangents@gnu.org; Wed, 21 Oct 2020 05:15:58 -0400 Original-Received: from static.rcdrun.com ([95.85.24.50]:45881) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVADo-0008OF-GG for emacs-tangents@gnu.org; Wed, 21 Oct 2020 05:15:54 -0400 Original-Received: from localhost ([::ffff:41.202.241.51]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002A0B3D.000000005F8FFC45.00007FAA; Wed, 21 Oct 2020 09:15:49 +0000 Content-Disposition: inline In-Reply-To: <873629rp97.fsf@gnuvola.org> Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support; helo=static.rcdrun.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/21 01:54:45 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-tangents@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-tangents" Xref: news.gmane.io gmane.emacs.tangents:410 Archived-At: Hello Thien-Thi, Nice to hear from you. It is only 4 years, 7 months and 14 days since I contacted you last time. To calculate I use PostgreSQL and bash function: function age () { NAME="$1"; DATE="$2"; if [[ $1 && $2 ]]; then AGE=$(psql -Stc "SELECT age(date('${DATE}'));"); echo $NAME: $AGE, was born on $DATE | sed 's/ mon / month /' | sed 's/ mons \| mons,/ months /'; else echo "No name or date supplied"; fi } * Thien-Thi Nguyen [2020-10-20 16:41]: > () support1 AT rcdrun.com > () Sun, 6 Mar 2016 19:08:32 +0100 > > Thank you for guile-pg. I am learning guile, and want to > convert existing website revision system and business > management to guile, as much as possible. I want to > contribute software for GNU. > > First thing is to use the PostgreSQL. > > This worked: > > (define pg (pg-connectdb "dbname=admin user=admin password=admin host=localhost") > pg > $7 = # > (pg-exec pg "SELECT * FROM data") > $8 = # > > so I get FATAL_ERROR, and cannot move forward. > > While same thing in psql: > > select * from data; > > data_id | data_date > ---------+------------------------------- > 1 | 2016-02-16 18:29:55.895082+00 > (1 row) > > Do you know what can it be possibly wrong, that I don't get > the output, but fatal error? > > I think you need to include the trailing semicolon in all valid > commands. Note that you did include it w/ psql but did not > include it w/ Guile-PG. > > -- > Thien-Thi Nguyen ----------------------------------------------- > (defun responsep (query) ; (2020) Software Libero > (pcase (context query) ; = Dissenso Etico > (`(technical ,ml) (correctp ml)) > ...)) 748E A0E8 1CB8 A748 9BFA > --------------------------------------- 6CE4 6703 2224 4C80 7502 At that time I needed PostgreSQL in Guile, but I could not get it working. Maybe that is why I have decided to look into Common Lisp implementation CLISP as they had the built-in PostgreSQL module, it worked well and still does. There is however hell with Common Lisp modules, sometimes it works, sometimes not, too many complexities. Then some years later I have found that my database backed business management could work well under GNU Emacs and written in Emacs Lisp. I have used development version and basic PostgreSQL package stopped working in Emacs, then I have included the emacs-libpq module which is fast, and so I have got quite a good interface and now handle all my database needs within Emacs. Who know, if I would find out back in time in 2017 how to use it in Guile, maybe all the programs would be made with Guile, now it is all based on Emacs Lisp and I am still to re-write many from Common Lisp. Jean P.S. I find this funny, and will send copy to emacs-tangents@gnu.org mailing list.