all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Thien-Thi Nguyen <ttn@gnuvola.org>
Cc: emacs-tangents@gnu.org
Subject: Re: guile-pg fatal error
Date: Wed, 21 Oct 2020 12:15:36 +0300	[thread overview]
Message-ID: <X4/8OESWP4bulrYN@protected.rcdrun.com> (raw)
In-Reply-To: <873629rp97.fsf@gnuvola.org>

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 <ttn AT gnuvola.org> [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-CONN:admin:localhost:5432:>
>    (pg-exec pg "SELECT * FROM data")
>    $8 = #<PG-RESULT:FATAL_ERROR>
> 
>    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.



       reply	other threads:[~2020-10-21  9:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160306180832.GA17572@protected.rcdrun.com>
     [not found] ` <873629rp97.fsf@gnuvola.org>
2020-10-21  9:15   ` Jean Louis [this message]
2020-10-21 20:51     ` guile-pg fatal error Thien-Thi Nguyen
2020-10-21 21:52       ` Jean Louis
2020-10-22  3:25         ` Pankaj Jangid
2020-10-22  8:47           ` Jean Louis

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X4/8OESWP4bulrYN@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=emacs-tangents@gnu.org \
    --cc=ttn@gnuvola.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.