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

Add support for two forms of PostgreSQL WITH syntax; loop and materialize #180

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

shane-circuithub
Copy link
Contributor

No description provided.

Comment on lines +21 to +28
loop :: Table Expr a => Query a -> (a -> Query a) -> Query a
loop base recurse =
Copy link
Contributor

Choose a reason for hiding this comment

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

Tantiziling close to being mfix!

@shane-circuithub shane-circuithub force-pushed the loop branch 2 times, most recently from e8edb0b to a006999 Compare July 1, 2022 00:37
@shane-circuithub shane-circuithub changed the base branch from master to window July 1, 2022 00:38
@shane-circuithub shane-circuithub force-pushed the window branch 3 times, most recently from 1b2908a to b789ccb Compare October 14, 2022 01:00
Base automatically changed from window to master October 14, 2022 01:06
@shane-circuithub shane-circuithub force-pushed the loop branch 2 times, most recently from c76943c to e72b2d5 Compare November 7, 2022 12:14
@chrisdone
Copy link

I’d like to use loop for walking trees, is this going to be merged? 🤔

@shane-circuithub shane-circuithub force-pushed the loop branch 2 times, most recently from b0d015a to bc17bd7 Compare March 23, 2023 17:24
@shane-circuithub shane-circuithub changed the title loop Add support for two forms of PostgreSQL WITH syntax; loop and materialize Mar 23, 2023
@shane-circuithub shane-circuithub marked this pull request as ready for review March 23, 2023 17:25
@shane-circuithub shane-circuithub force-pushed the loop branch 2 times, most recently from 1f61962 to ccf09d7 Compare March 23, 2023 17:49
@shane-circuithub
Copy link
Contributor Author

@chrisdone Yes, I've revived this and it should be merged in the next few days.

@chrisdone
Copy link

@chrisdone Yes, I've revived this and it should be merged in the next few days.

Oh, great, thanks!

Comment on lines 31 to 33
-- used more than once. We reserve the right to change the implementation of
-- 'materialize' to use the newer @WITH foo AS MATERIALIZED bar@ syntax
-- introduced in PostgreSQL 12 in the future.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we add:

Suggested change
-- used more than once. We reserve the right to change the implementation of
-- 'materialize' to use the newer @WITH foo AS MATERIALIZED bar@ syntax
-- introduced in PostgreSQL 12 in the future.
-- used more than once. We reserve the right to change the implementation of
-- 'materialize' to use the newer @WITH foo AS MATERIALIZED bar@ syntax
-- introduced in PostgreSQL 12 in the future. Currently Rel8 does not use
-- @AS MATERIALIZED@ to support earlier PostgreSQL versions.

I'd like to make it absolutely clear that we don't use that syntax.

Copy link
Contributor

@ocharles ocharles left a comment

Choose a reason for hiding this comment

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

LGTM!

@shane-circuithub shane-circuithub merged commit e7cf7b2 into master Mar 28, 2023
@shane-circuithub shane-circuithub deleted the loop branch March 28, 2023 17:50
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