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

implemented materialized views for pg #120

Merged
merged 6 commits into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Changes for SQL::Translator

* sqlt-diff: Change producer_args to sqlt_args for better self-documentation
* Support INCLUDE on indices for Pg (producer + parser)
* Postgres producer now supports materialized views via $extra->{materialized}

1.62 - 2020-09-14
* Update Pg support to allow version 12 (still supporting back to 7.4)
Expand Down
49 changes: 49 additions & 0 deletions lib/SQL/Translator/Producer/PostgreSQL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Does not yet support PostGIS Views.

=head2 Producer Args

You can change the global behavior of the producer by passing the following options to the
C<producer_args> attribute of C<SQL::Translator>.

=over 4

=item postgres_version
Expand Down Expand Up @@ -50,6 +53,52 @@ instead of this

=back

=head2 Extra args

Various schema types support various options via the C<extra> attribute.

=over 2

=item Tables

=over 2

=item temporary

Produces a temporary table.

=back

=item Views

=over 2

=item temporary

Produces a temporary view.

=item materialized

Produces a materialized view.

=back

=item Fields

=over 2

=item list, custom_type_name

For enum types, list is the list of valid values, and custom_type_name is the name that
the type should have. Defaults to $table_$field_type.

=item geometry_type, srid, dimensions, geography_type

Fields for use with PostGIS types.

=back

=back

=cut

Expand Down