As the title says, I am looking for a library that can connect to Progres and execute a stored procedure with either input or output parameters. Or even a user defined function.

I’ve checked the documentation of these three libraries:

  • cl-progres
  • pg-dot-lisp
  • clsql

but there seems to be no mention or example of executing a stored procedure. Is it just not documented? Are there other ways I can do it apart from these three?

  • AxenZh@alien.topOPB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Thanks. I’ve come across a page describing how to execute stored procedure in CLSQL:

    if you want just execute stored procedure then (execute-command "sp_bla 1, 2")
    If your stored procedure returns table or single value then (query "sp_bla 1, 2")

    which is quite similar to Lispworks apart from wrapping the call to the procedure with PL/SQL BEGIN END pair.
    (sql:execute-command "BEGIN my_procedure(1, 'foo'); END;")