Skip to content
Postgres features showcase (commented SQL samples) for beginners
TSQL PLpgSQL Python Shell
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
00_create_database.sql User / role creation updates Aug 13, 2019
01_create_role.sql User / role creation updates Aug 13, 2019
02_create_schema.sql
02_search_path.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
03_make_public_schema_secure.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
04_alter_role.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
05_create_table.sql SERIAL and IDENTITY column info Aug 14, 2019
06_create_table_options.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
07_table_partitioning.sql Add "table partitioning" chapter Aug 14, 2019
08_alter_table.sql Add "table partitioning" chapter Aug 14, 2019
09_data_type_showcase.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
10_constraints.sql Add chapter on constraints Aug 14, 2019
14_views.sql Add chapter on constraints Aug 14, 2019
15_materialized_views.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
20_stored_functions.sql v11 stored procedures described Aug 15, 2019
21_stored_procedures.sql v11 stored procedures described Aug 15, 2019
25_table_using_sproc.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
30_simple_trigger.sql Update 30_simple_trigger.sql Apr 30, 2019
32_event_trigger.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
40_custom_types.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
41_enum_types.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
45_extensions.sql Update TODO list Aug 14, 2019
50_row_level_security.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
60_transaction_management.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
61_terminating_queries.sql Chapter on terminating queries / sessions Aug 15, 2019
70_basic_analytics.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
75_parallel_query_execution.sql Add info on "covering" indexes and "parallel query" Aug 14, 2019
80_advanced_indexing.sql Add info on "covering" indexes and "parallel query" Aug 14, 2019
81_string_processing.sql Added rollout.sh + made all script executable on their own Sep 11, 2017
82_arrays.sql Arrays - added samples for ARRAY constructor Sep 11, 2017
LICENSE Initial commit Apr 4, 2017
README.md Added rollout.sh + made all script executable on their own Sep 11, 2017
psql_basics.md
python_connectivity.py restructuring Aug 14, 2017
rollout.sh
todo.txt Chapter on terminating queries / sessions Aug 15, 2019

README.md

postgres-showcase

Sample object creation and query scripts to illustrate different Postgres object types and data quering possibilities. Targeted for beginners.

Rollout

For running all the scripts on a local Postgres DB (superuser assumed) use the provided rollout.sh script which consist of:

ls *.sql | sort -n | xargs -n 1 psql -f

All feedback welcome!

You can’t perform that action at this time.