Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for ... RETURNS Text[] AS ... please #132

Open
TssT16 opened this issue Feb 4, 2020 · 4 comments
Open

Example for ... RETURNS Text[] AS ... please #132

TssT16 opened this issue Feb 4, 2020 · 4 comments

Comments

@TssT16
Copy link

TssT16 commented Feb 4, 2020

Can you please give a example how to make a text[] return.
I am new in Rust so I have no idear but what I want is something like this.

CREATE FUNCTION concat_rs(text, text) RETURNS text[] AS 'path/to/crate/target/release/libstrings.dylib', 'pg_concat_rs' LANGUAGE C STRICT;

@bluejekyll
Copy link
Owner

I'm a little confused by the result type your going for here, based on the function name (maybe that's just a quick example you have here though?).

These examples are close: https://github.com/bluejekyll/pg-extend-rs/blob/master/examples/strings/src/lib.rs#L30

If you really want an array perhaps @auterium might have something? I know that was an area he was working in.

@auterium
Copy link
Contributor

auterium commented Feb 5, 2020

Unfortunatelly I recently lost all my un-published progress regarding arrays as my laptop was stolen on my way back home. I'm slowly rebuilding the private code I was working on, so until that's done, I won't be able to work again on this.

@TssT16
Copy link
Author

TssT16 commented Feb 5, 2020

I'm sorry for you @auterium that your Laptop was stolen. As a work around I give it now as a json string over.
@auterium it would be great if you can share your code but no rush. I have time :)

@auterium
Copy link
Contributor

auterium commented Feb 5, 2020

Thanks @TssT16. Most of the code that I must rebuild is actually propietary, so I won't be able to share it. However, some parts that can be pushed up to pg-extend-rs I would definitely send out as a PR as soon as I have some time to build it up :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants