public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kirill Reshke <[email protected]>
To: [email protected]
Subject: CREATE SCHEMA ... CREATE M.V. support
Date: Mon, 11 Nov 2024 13:06:57 +0500
Message-ID: <CALdSSPgxcRkooZ2iQ5A7XhYoexVAdbiT6znZDqJTE8hxUVjz_A@mail.gmail.com> (raw)
Hi!
I was exploring the PostgreSQL parser and discovered a very
interesting feature. Users can create schema along with schema objects
in single SQL.
So, for example
```
db1=# create schema shshshsh create table t1(i int) create view v1 as
select * from t1;
CREATE SCHEMA
```
works.
But `create schema shshshsh create materialized view v1 as select `
will not work.
I was trying to search for relevant discussions, but failed. It
appears that the feature has been available from 7.3 versions[1].
Support for materialized views began in 9.3. Perhaps, then, this is
simply something that was overlooked for support?
It appears that supporting this is as simple as changing this parser's
non-terminal [2]. However, perhaps there are justifications for why we
forbid this?
P.S. is this the correct place to make this question?
[1] https://git.postgresql.org/cgit/postgresql.git/tree/src/backend/parser/gram.y?h=REL7_3_STABLE#n802
[2] https://git.postgresql.org/cgit/postgresql.git/tree/src/backend/parser/gram.y?h=14e87ffa5c543b5f30ea...
--
Best regards,
Kirill Reshke
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: CREATE SCHEMA ... CREATE M.V. support
In-Reply-To: <CALdSSPgxcRkooZ2iQ5A7XhYoexVAdbiT6znZDqJTE8hxUVjz_A@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox