From: | Christopher Browne <cbbrowne(at)gmail(dot)com> |
---|---|
To: | Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: JSON for PG 9.2 |
Date: | 2011-12-20 20:52:04 |
Message-ID: | CAFNqd5W+P+tTrCK52CEf-koxzWrFNJGZAG64zef+z6mbu+e=9w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Dec 19, 2011 at 5:49 AM, Dimitri Fontaine
<dimitri(at)2ndquadrant(dot)fr> wrote:
> My understanding is that JSON is a subset of ECMAscript, so if you get
> the latter you already have the former. Now, someone would have to
> check if plscheme still build with guile-2.0, and given that, how
> exactly you get pl/ecmascript (or pl/js) out of that.
I don't think so.
I checked it out (still on pgfoundry, still on CVS, and code hasn't
been touched since 2008), and run into some issues.
- It looks for libguile.h
#include "libguile.h"
which, on 2.0, has shifted around from /usr/include/libguile.h (1.8)
to /usr/include/guile/2.0/libguile.h
It's not doing enough indirections internally; there is a guile-config
that is analogous to pg_config
postgres(at)cbbrowne [03:48:43] [~/PostgreSQL/plscheme]
-> % guile-config compile
-pthread -I/usr/include/guile/2.0
postgres(at)cbbrowne [03:48:45] [~/PostgreSQL/plscheme]
-> % guile-config link
-lguile-2.0 -lgc
It looks like there's something PG-related as a next issue:
-> % ./install.sh
pg_config : /var/lib/postgresql/dbs/postgresql-HEAD/bin/pg_config
module-dir : /var/lib/postgresql/dbs/postgresql-HEAD/lib
max-cache-size: 64
dbname : postgres
safe-r5rs : NO
dbacreate : NO
PSQL : /var/lib/postgresql/dbs/postgresql-HEAD/bin/psql postgres
CPPFLAGS : -g -Wall -fpic -c
-I/var/lib/postgresql/dbs/postgresql-HEAD/include/server
-I/usr/include/guile/2.0
LDFLAGS : -shared -lguile
Compiling... failed!
plscheme.c: In function '_PG_init':
plscheme.c:647:2: warning: implicit declaration of function
'DefineCustomStringVariable' [-Wimplicit-function-declaration]
plscheme.c:650:30: error: 'PGC_BACKEND' undeclared (first use in this function)
plscheme.c:650:30: note: each undeclared identifier is reported only
once for each function it appears in
plscheme.c:652:2: warning: implicit declaration of function
'DefineCustomIntVariable' [-Wimplicit-function-declaration]
plscheme.c: In function 'plscheme_func_handler':
plscheme.c:742:2: warning: implicit declaration of function
'GetTopTransactionId' [-Wimplicit-function-declaration]
plscheme.c: In function 'parse_trig_args':
plscheme.c:1623:44: error: dereferencing pointer to incomplete type
plscheme.c:1628:38: error: dereferencing pointer to incomplete type
...
(See error.log for details.)
I'm not sure to what degree this is bitrot relating to:
a) Postgres changes
b) Guile changes
but there's doubtless a bit of both.
I'd think it interesting to get this back to working order, whether
it's useful for JavaScript or not.
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2011-12-20 20:53:34 | sorting table columns |
Previous Message | Kevin Grittner | 2011-12-20 20:21:35 | deferrable triggers |