[HN Gopher] CG/SQL - SQL dialect compiler to C for sqlite3 mimic...
___________________________________________________________________
CG/SQL - SQL dialect compiler to C for sqlite3 mimicking stored
procedures
Author : linkdd
Score : 22 points
Date : 2026-02-01 08:25 UTC (4 days ago)
(HTM) web link (ricomariani.github.io)
(TXT) w3m dump (ricomariani.github.io)
| DenisDolya wrote:
| CG-SQL = an attempt to give C what Python has had for a long
| timeconvenient "scripted" work with the database, but without
| losing speed.This is cool.
| pjmlp wrote:
| Oracle was already doing this in the 1990's with Pro*C.
|
| https://docs.oracle.com/cd/A97630_01/win.920/a96111/intro.ht...
|
| Sybase and Informix also used to have something similar.
| dfox wrote:
| PostgreSQL has this:
| https://www.postgresql.org/docs/current/ecpg.html
| pjmlp wrote:
| Thanks for the heads up.
| vmsp wrote:
| I'm guessing this is a fork of Facebook's abandoned library?
| https://github.com/facebookincubator/CG-SQL
| actionfromafar wrote:
| From the repo: _" Meta continues to make periodic ad hoc
| contributions to this fork and merge corrections back to their
| private repo. The maintainer thanks Meta for this continued
| informal cooperation."_
| fulafel wrote:
| Is it safe?
| HexDecOctBin wrote:
| I always wonder why SQLite didn't expose a programmatic way for
| creating a query (as opposed to parsing SQL statements). Given
| that it was designed to be embedded, it seems to me that it would
| have made far more sense to provide an API based interface. Then,
| for example, stored procedures would just be function pointers
| passed as callbacks.
| thesz wrote:
| SQLite was a library for TCL, implementing "sqlite" command,
| and from TCL one can use it in a variety of interesting ways,
| approaching and even surpassing "stored procedures" concept.
|
| For example, it is easy to create SQL function using TCL:
| https://sqlite.org/tclsqlite.html#the_function_method
___________________________________________________________________
(page generated 2026-02-05 23:01 UTC)