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!

@chrisdone
Copy link

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

@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
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
2 checks passed
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.

None yet

3 participants