Skip to content

Conversation

@eeeebbbbrrrr
Copy link
Contributor

This PR gets support for set returning functions. It needs tests and another once over, but this little sql works now:

[v15.3][483091] plrust=# create function foo() returns table (a int, b int) language plrust as $$

Ok(Some(TableIterator::new(vec![(Some(1), Some(2))].into_iter())))
$$;
CREATE FUNCTION
Time: 3683.713 ms (00:03.684)
[v15.3][483091] plrust=# select * from foo();
 a | b 
---+---
 1 | 2
(1 row)

Copy link
Contributor

@BradyBonnette BradyBonnette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, if more changes are needed lmk!

@eeeebbbbrrrr
Copy link
Contributor Author

I'm gonna hold this until we get pgcentralfoundation/pgrx#1164 over in pgrx merged and released.

This PR will need a test around returning a table with 1 field, which is blocked on that pgrx PR right now.

@eeeebbbbrrrr
Copy link
Contributor Author

I'm gonna hold this until we get tcdi/pgrx#1164 over in pgrx merged and released.

This PR will need a test around returning a table with 1 field, which is blocked on that pgrx PR right now.

Done. Added the dependency updates to this PR too, since it needs them. Once CI passes I'm gonna merge.

@eeeebbbbrrrr eeeebbbbrrrr merged commit d1dd4da into develop Jun 8, 2023
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

Successfully merging this pull request may close these issues.

3 participants