Giter VIP home page Giter VIP logo

plsci's Introduction

pl/sci

project chat

Status

This is very much an experiment and I'm open to feedback on where to take this next.

Build

Requirements

Steps

  1. Set GRAALVM_HOME to your GraalVM directory (the one that contains the bin directory).

  2. Run script/compile-libplsci. Currently this build script contains some macOS-specific things like .dylib and install_name_tool. This will be made more portable later on (PR welcome).

  3. Run cargo pgx run pg13. Then try it out:

psql (13.0)
Type "help" for help.

plsci=# create extension plsci;
CREATE EXTENSION

plsci=# select * from plsci('(+ 1 2 3)');
 plsci
-------
 6
(1 row)

License

Copyright © 2021 Michiel Borkent

Distributed under the EPL License. See LICENSE.

plsci's People

Contributors

borkdude avatar 0xflotus avatar

Stargazers

Tuan Duc Tran avatar João Fernando Apel Miguel avatar Jiri Knesl avatar  avatar Michael Salihi avatar Kirill Gerasimenko avatar Mikhail Kuzmin avatar Veha Suwatphisankij avatar Søren Sjørup avatar Hoang Phan avatar Dmitriy Dorofeev avatar Pavlos avatar Filipe A Moreira avatar Tim Greene avatar Andrejs Agejevs avatar  avatar Amar Sood avatar Forrest Galloway avatar Jaschar Jisreel Domann avatar Simon Gray avatar Michael Simons avatar Henry Widd avatar Ákos Kiss avatar Steffen Dienst avatar Lauri Oherd avatar Lucas Severo avatar Igor Garcia avatar Dominic Monroe avatar 爱可可-爱生活 avatar Tomek Wałkuski avatar Ying Liu avatar Vladimir Mladenovic avatar Ilshat Sultanov avatar  avatar Caio Rulli Thomaz avatar Ivan Pierre avatar 胡雨軒 Петр avatar Don Jackson avatar Joël Kuiper avatar  avatar Micah Elliott avatar Chris Zheng avatar Dima Novotochinov avatar  avatar Tommi Reiman avatar Zhao Xiaohong avatar Kevin van Rooijen avatar Aleksander Sumowski avatar Kirill Chernyshov avatar

Watchers

 avatar James Cloos avatar kees ter brugge avatar  avatar George Athanassiades avatar

plsci's Issues

Second invocation of `cargo pgx run pg13` after building libplsci fails with "Symbol not found: _eval_string"

The first time after building libplsci I can successfully run cargo pgx run:

installing extension
     Copying control file to `/Users/borkdude/.pgx/13.0/pgx-install/share/postgresql/extension/plsci.control`
     Copying shared library to `/Users/borkdude/.pgx/13.0/pgx-install/lib/postgresql/plsci.so`
     Writing extension schema to `/Users/borkdude/.pgx/13.0/pgx-install/share/postgresql/extension/plsci--1.0.sql`
    Finished installing plsci
    Starting Postgres v13 on port 28813
    Re-using existing database plsci
psql (13.0)
Type "help" for help.

plsci=# select * from plsci('(+ 1 2 3)');
 plsci
-------
 6
(1 row)

plsci=# ^D\q

However, the second time, I get:

$ cargo pgx run pg13
    Stopping Postgres v13
building extension with features `pg13`
"cargo" "build" "--features" "pg13" "--no-default-features"
   Compiling plsci v0.0.0 (/Users/borkdude/Dropbox/dev/clojure/plsci)
    Finished dev [unoptimized + debuginfo] target(s) in 2.83s

installing extension
     Copying control file to `/Users/borkdude/.pgx/13.0/pgx-install/share/postgresql/extension/plsci.control`
     Copying shared library to `/Users/borkdude/.pgx/13.0/pgx-install/lib/postgresql/plsci.so`
     Writing extension schema to `/Users/borkdude/.pgx/13.0/pgx-install/share/postgresql/extension/plsci--1.0.sql`
    Finished installing plsci
    Starting Postgres v13 on port 28813
    Re-using existing database plsci
psql (13.0)
Type "help" for help.

plsci=# select * from plsci('(+ 1 2 3)');
ERROR:  could not load library "/Users/borkdude/.pgx/13.0/pgx-install/lib/postgresql/plsci.so": dlopen(/Users/borkdude/.pgx/13.0/pgx-install/lib/postgresql/plsci.so, 10): Symbol not found: _eval_string
  Referenced from: /Users/borkdude/.pgx/13.0/pgx-install/lib/postgresql/plsci.so
  Expected in: flat namespace
 in /Users/borkdude/.pgx/13.0/pgx-install/lib/postgresql/plsci.so
plsci=#

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.