emacs-tangents
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guile-pg fatal error


From: Jean Louis
Subject: Re: guile-pg fatal error
Date: Wed, 21 Oct 2020 12:15:36 +0300
User-agent: Mutt/+ (1036f0e) (2020-10-18)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]