sraoss / pg_ivm

IVM (Incremental View Maintenance) implementation as a PostgreSQL extension
Other
862 stars 24 forks source link

Crash when DDL is set to the second argument of the create_immv function. #37

Closed nuko-yokohama closed 1 year ago

nuko-yokohama commented 1 year ago

Hi.

I am verifying pg_ivm 1.3 on PostgreSQL 15. When I run the create_immv function with the following arguments, it crashes.

=# SELECT create_immv('foo','CREATE MATERIALIZED VIEW foo AS SELECT 1');
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        This probably means the server terminated abnormally before or while processing the request.
Attempting reset: Failed.
The connection to the server was lost.
=Attempting reset: Failed. =?

The same problem may occur if you set DDL to the second argument of the create_immv function.

yugo-n commented 1 year ago

Thank you for your reporting!

I'll fix it to check if the second arguments is a SELECT query. Thanks!

yugo-n commented 1 year ago

The issue was fixed by #39.