Skip to content

Instantly share code, notes, and snippets.

@IshaanAdarsh
Last active June 17, 2025 09:34

Revisions

  1. IshaanAdarsh revised this gist Aug 31, 2023. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -58,7 +58,13 @@ These contributions collectively provided valuable insights into PostgreSQL exte

    #### I authored the documentation in my personal GitHub repository -> [Postgres-extension-tutorial](https://github.com/IshaanAdarsh/Postgres-extension-tutorial)

    #### [Final documentation](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/tree/main/SGML)
    <hr>
    <p align="center">
    <a href = "https://github.com/IshaanAdarsh/Postgres-extension-tutorial/tree/main/SGML">
    Final documentation
    </a>
    </p>
    <hr>

    #### Pull Requests:
    | #Pull Request | Title | Status |
  2. IshaanAdarsh revised this gist Aug 30, 2023. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -56,7 +56,7 @@ In pursuit of understanding the project more deeply, I initiated the groundwork
    ### Contributions during GSoC
    These contributions collectively provided valuable insights into PostgreSQL extension development, showcasing a variety of techniques and illustrating the versatility of PostgreSQL's extensibility capabilities.

    I authored the documentation in my personal GitHub repository -> [Postgres-extension-tutorial](https://github.com/IshaanAdarsh/Postgres-extension-tutorial)
    #### I authored the documentation in my personal GitHub repository -> [Postgres-extension-tutorial](https://github.com/IshaanAdarsh/Postgres-extension-tutorial)

    #### [Final documentation](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/tree/main/SGML)

    @@ -93,7 +93,7 @@ I authored the documentation in my personal GitHub repository -> [Postgres-exten
    | [my_extension (Simple SQL Extension)](https://github.com/IshaanAdarsh/my_extension) | Created `my_extension` for comprehensive tutorial on extension development. | Prerequisites, Makefile, PGXS/PGXN, Procedural/External languages, Regression tests, Release management | [v1.0.0](https://pgxn.org/dist/my_extension/1.0.0/) | Custom table creation. |
    | | | | [v1.0.1](https://pgxn.org/dist/my_extension/1.0.1/) | `complex_add` function. |
    | | | | [v1.1.0](https://pgxn.org/dist/my_extension/1.1.0/) | `multiply` function. |
    | [pg_sample_ext](https://github.com/IshaanAdarsh/pg_sample_ext) | `pg_sample_ext` showcases gradual introduction of features. | Square function, Custom Data Types (Composite, Enumerated, Domain), Operator `@*` | [v1.0.0](https://pgxn.org/dist/pg_sample_ext/1.0.0/) | `square` function. |
    | [pg_sample_ext](https://github.com/IshaanAdarsh/pg_sample_ext) | `pg_sample_ext` showcases gradual introduction of features. | Custom Function, Custom Data Types (Composite, Enumerated, Domain), Custom Operator | [v1.0.0](https://pgxn.org/dist/pg_sample_ext/1.0.0/) | `square` function. |
    | | | | [v1.0.1](https://pgxn.org/dist/pg_sample_ext/1.0.1/) | Custom Data Types (Composite, Enumerated, Domain). |
    | | | | [v1.0.2](https://pgxn.org/dist/pg_sample_ext/1.0.2/) | Operator `@*`. |
    | [pg_cext](https://github.com/IshaanAdarsh/pg_cext) | Demonstrates extension development with external language C. | Custom `add_nums` function using C. | [v1.0.0](https://pgxn.org/dist/pg_cext/1.0.0/) | `add_nums` in C. |
    @@ -138,10 +138,10 @@ As a GSoC participant, I am committed to staying involved in the project and hel

    I extend my heartfelt gratitude to Google for hosting the Google Summer of Code program, providing a remarkable platform that enabled me to make a meaningful impact on the open-source community. This program has not only fostered personal growth but has also inspired my peers and immediate surroundings to embrace the world of open-source contributions.

    I would like to express my sincere appreciation to my mentor's David E. Wheeler(@theory) and Jimmy Angelakos(@vyruss) for their support, invaluable guidance throughout the program. Their expertise and insights have been instrumental in shaping my journey and ensuring the success of my project.
    I would like to express my sincere appreciation to my mentor's David E. Wheeler ([@theory](https://github.com/theory)) and Jimmy Angelakos ([@vyruss](https://github.com/vyruss)) for their support, invaluable guidance throughout the program. Their expertise and insights have been instrumental in shaping my journey and ensuring the success of my project.

    I am also thankful to Jerry Sievert(@JerrySievert), whose input and suggestions have played a crucial role in refining my project and enhancing its overall quality.
    I am also thankful to Jerry Sievert ([@JerrySievert](https://github.com/JerrySievert)), whose input and suggestions have played a crucial role in refining my project and enhancing its overall quality.

    Lastly, I am indebted to fellow contributors like Rajiv Harlalka(@rajivharlalka) for their collaborative spirit and support. Their willingness to share knowledge and exchange ideas significantly contributed to the success of the project.
    Lastly, I am indebted to fellow contributors like Rajiv Harlalka ([@rajivharlalka](https://github.com/rajivharlalka)) for their collaborative spirit and support. Their willingness to share knowledge and exchange ideas significantly contributed to the success of the project.

    Participating in this program has been an enriching and transformative experience, allowing me to delve into the realm of software engineering, enhance my research skills, and contribute meaningfully to the open-source community.
  3. IshaanAdarsh revised this gist Aug 30, 2023. 1 changed file with 19 additions and 60 deletions.
    79 changes: 19 additions & 60 deletions GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -85,67 +85,26 @@ I authored the documentation in my personal GitHub repository -> [Postgres-exten
    | [Postgres-extension-tutorial#29](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/29) | Issue in Installing PL/Python on Postgres | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |

    ### A Brief Overview of Created Extensions:
    This section provides concise summaries of the extensions developed during the project, showcasing various aspects of PostgreSQL extension development:

    #### 1) [my_extension (Simple SQL Extension)](https://github.com/IshaanAdarsh/my_extension)
    **Description:** Created the `my_extension` extension, which served as the centerpiece for the tutorial. The extension was used to demonstrate various aspects of PostgreSQL extension development.

    **Tutorial Topics Covered:**
    - Prerequisites and extension architecture.
    - Writing a Makefile for building the extension.
    - Utilizing PGXS and PGXN tools for extension management.
    - Explanation of Procedural and External languages.
    - Writing regression tests to ensure extension reliability.
    - Insights into extension release management.

    **Versions and Features:**
    - **[v1.0.0](https://pgxn.org/dist/my_extension/1.0.0/)**
    - Created a custom table within the extension.

    - **[v1.0.1](https://pgxn.org/dist/my_extension/1.0.1/)**
    - Added a new function called `complex_add`.
    - Function takes an array of integers as input and returns their sum.

    - **[v1.1.0](https://pgxn.org/dist/my_extension/1.1.0/)**
    - Added a new function called `multiply`.
    - Function takes two integers as input and returns their product.

    #### 2) [pg_sample_ext](https://github.com/IshaanAdarsh/pg_sample_ext)
    **Description:** `pg_sample_ext` is a comprehensive example extension demonstrating the gradual introduction of PostgreSQL features like Functions, Data Types (CREATE TYPE, CREATE DOMAIN), and Operators.

    **Versions and Features:**
    - **[v1.0.0](https://pgxn.org/dist/pg_sample_ext/1.0.0/)**
    - Added the `square` function to calculate the square of a number.

    - **[v1.0.1](https://pgxn.org/dist/pg_sample_ext/1.0.1/)**
    - Introduced custom Data Types.
    - Composite Type: Introduced `person_type`, representing a person's name and age.
    - Enumerated Type: Introduced `status_type` with values 'active', 'inactive', and 'pending'.
    - Domain Type: Added `positive_integer` to handle positive integer values with enhanced data validation.

    - **[v1.0.2](https://pgxn.org/dist/pg_sample_ext/1.0.2/)**
    - Included custom operator `@*` to perform multiplication on `my_type` values.

    #### 3) [pg_cext](https://github.com/IshaanAdarsh/pg_cext)
    **Description:** Created the `pg_cext` extension to demonstrate PostgreSQL extensions developed using external languages, utilizing C for implementation.

    **Versions and Features:**
    - **[v1.0.0](https://pgxn.org/dist/pg_cext/1.0.0/)**
    - Implemented custom function `add_nums` in C to add two numbers together.

    #### 4) [pg_plpgsql_ext](https://github.com/IshaanAdarsh/pg_plpgsql_ext)
    **Description:** Developed the `pg_plpgsql_ext` extension as an example of building extensions using procedural languages, specifically PL/pgSQL.
    <br>

    **Versions and Features:**
    - **[v1.0.0](https://pgxn.org/dist/pg_plpgsql_ext/1.0.0/)**
    - Introduced custom function `subtract_numbers` to subtract two numbers using PL/pgSQL.
    | Extension | Description | Tutorial Topics Covered | Version | Feature |
    | --- | --- | --- | --- | --- |
    | [my_extension (Simple SQL Extension)](https://github.com/IshaanAdarsh/my_extension) | Created `my_extension` for comprehensive tutorial on extension development. | Prerequisites, Makefile, PGXS/PGXN, Procedural/External languages, Regression tests, Release management | [v1.0.0](https://pgxn.org/dist/my_extension/1.0.0/) | Custom table creation. |
    | | | | [v1.0.1](https://pgxn.org/dist/my_extension/1.0.1/) | `complex_add` function. |
    | | | | [v1.1.0](https://pgxn.org/dist/my_extension/1.1.0/) | `multiply` function. |
    | [pg_sample_ext](https://github.com/IshaanAdarsh/pg_sample_ext) | `pg_sample_ext` showcases gradual introduction of features. | Square function, Custom Data Types (Composite, Enumerated, Domain), Operator `@*` | [v1.0.0](https://pgxn.org/dist/pg_sample_ext/1.0.0/) | `square` function. |
    | | | | [v1.0.1](https://pgxn.org/dist/pg_sample_ext/1.0.1/) | Custom Data Types (Composite, Enumerated, Domain). |
    | | | | [v1.0.2](https://pgxn.org/dist/pg_sample_ext/1.0.2/) | Operator `@*`. |
    | [pg_cext](https://github.com/IshaanAdarsh/pg_cext) | Demonstrates extension development with external language C. | Custom `add_nums` function using C. | [v1.0.0](https://pgxn.org/dist/pg_cext/1.0.0/) | `add_nums` in C. |
    | [pg_plpgsql_ext](https://github.com/IshaanAdarsh/pg_plpgsql_ext) | Example of extension using PL/pgSQL. | Custom `subtract_numbers` function using PL/pgSQL. | [v1.0.0](https://pgxn.org/dist/pg_plpgsql_ext/1.0.0/) | `subtract_numbers` in PL/pgSQL. |
    | [pg_py_ext](https://github.com/IshaanAdarsh/pg_py_ext) | Showcases extension development with PL/Python3u. | Custom `add_nums` function using PL/Python3u. | [v1.0.0](https://pgxn.org/dist/pg_py_ext/1.0.0/) | `add_nums` in PL/Python3u. |

    #### 5) [pg_py_ext](https://github.com/IshaanAdarsh/pg_py_ext)
    **Description:** Created the `pg_py_ext` extension to showcase extension development using procedural languages, specifically PL/Python3u.
    <br>

    **Versions and Features:**
    - **[v1.0.0](https://pgxn.org/dist/pg_py_ext/1.0.0/)**
    - Implemented custom function `add_nums` to add two numbers together using PL/Python3u.
    #### Weekly Blogs(Proof-of-Work)
    - Made daily blogs on the projects development -> [PostgreSQL - GSoC Journey](https://reqi3m.hashnode.dev).
    - Weekly blogs/reports can be found at [Medium Blog](https://medium.com/@Requ13m).

    ## Outcome
    Throughout the Google Summer of Code 2023, my contributions have led to the creation of a comprehensive and user-friendly tutorial that guides developers through the process of writing PostgreSQL extensions. This tutorial aims to address the existing lack of clear documentation on this topic and provide newcomers with a quick start guide to extension development. The tutorial covers various essential aspects of extension development, making it easier for new contributors to get involved and contribute to the extension ecosystem.
    @@ -179,10 +138,10 @@ As a GSoC participant, I am committed to staying involved in the project and hel

    I extend my heartfelt gratitude to Google for hosting the Google Summer of Code program, providing a remarkable platform that enabled me to make a meaningful impact on the open-source community. This program has not only fostered personal growth but has also inspired my peers and immediate surroundings to embrace the world of open-source contributions.

    I would like to express my sincere appreciation to my mentor's David E. Wheeler(theory) and Jimmy Angelakos(vyruss) for their support, invaluable guidance throughout the program. Their expertise and insights have been instrumental in shaping my journey and ensuring the success of my project.
    I would like to express my sincere appreciation to my mentor's David E. Wheeler(@theory) and Jimmy Angelakos(@vyruss) for their support, invaluable guidance throughout the program. Their expertise and insights have been instrumental in shaping my journey and ensuring the success of my project.

    I am also thankful to Jerry Sievert(JerrySievert), whose input and suggestions have played a crucial role in refining my project and enhancing its overall quality.
    I am also thankful to Jerry Sievert(@JerrySievert), whose input and suggestions have played a crucial role in refining my project and enhancing its overall quality.

    Lastly, I am indebted to fellow contributors like Rajiv Harlalka(rajivharlalka) for their collaborative spirit and support. Their willingness to share knowledge and exchange ideas significantly contributed to the success of the project.
    Lastly, I am indebted to fellow contributors like Rajiv Harlalka(@rajivharlalka) for their collaborative spirit and support. Their willingness to share knowledge and exchange ideas significantly contributed to the success of the project.

    Participating in this program has been an enriching and transformative experience, allowing me to delve into the realm of software engineering, enhance my research skills, and contribute meaningfully to the open-source community.
  4. IshaanAdarsh revised this gist Aug 22, 2023. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -58,6 +58,8 @@ These contributions collectively provided valuable insights into PostgreSQL exte

    I authored the documentation in my personal GitHub repository -> [Postgres-extension-tutorial](https://github.com/IshaanAdarsh/Postgres-extension-tutorial)

    #### [Final documentation](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/tree/main/SGML)

    #### Pull Requests:
    | #Pull Request | Title | Status |
    | :--- | :---- | :-------: |
  5. IshaanAdarsh revised this gist Aug 21, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -76,7 +76,7 @@ I authored the documentation in my personal GitHub repository -> [Postgres-exten
    | [Postgres-extension-tutorial#19](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/19) | Unknown META specification, cannot validate. [Spec v1.0.1] | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#20](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/20) | aggregate function calls cannot contain set-returning function calls | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#22](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/22) | ALTER EXTENSION ERROR no update path | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#23](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/23) | network error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#23](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/23) | network error: [SSL: CERTIFICATE_VERIFY_FAILED] | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#24](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/24) | gem ... (OptionParser::InvalidOption) invalid option: --no-rdoc | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#26](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/26) | Error while implementing Custom Operator in PostgreSQL | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#28](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/28) | Error while using CREATE EXTENSION command | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
  6. IshaanAdarsh revised this gist Aug 21, 2023. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@

    **Repository link:** https://github.com/postgres/postgres/tree/master/doc

    **Project Name:** Postgres extension tutorial / quick start
    **Project Name:** [Postgres extension tutorial / quick start](https://github.com/IshaanAdarsh/Postgres-extension-tutorial)

    **Project Summary:** This project aims to create a comprehensive and easy-to-follow tutorial on how to write a Postgres extension, addressing the current lack of clear documentation on the topic. The tutorial will assume only knowledge of Postgres and the target language, and will cover topics such as
    - Writing a Makefile
    @@ -85,7 +85,7 @@ I authored the documentation in my personal GitHub repository -> [Postgres-exten
    ### A Brief Overview of Created Extensions:
    This section provides concise summaries of the extensions developed during the project, showcasing various aspects of PostgreSQL extension development:

    #### 1) [my_extension (Simple SQL Extension)](https://pgxn.org/dist/my_extension/1.1.0/)
    #### 1) [my_extension (Simple SQL Extension)](https://github.com/IshaanAdarsh/my_extension)
    **Description:** Created the `my_extension` extension, which served as the centerpiece for the tutorial. The extension was used to demonstrate various aspects of PostgreSQL extension development.

    **Tutorial Topics Covered:**
    @@ -108,7 +108,7 @@ This section provides concise summaries of the extensions developed during the p
    - Added a new function called `multiply`.
    - Function takes two integers as input and returns their product.

    #### 2) [pg_sample_ext](https://pgxn.org/dist/pg_sample_ext/1.0.2/)
    #### 2) [pg_sample_ext](https://github.com/IshaanAdarsh/pg_sample_ext)
    **Description:** `pg_sample_ext` is a comprehensive example extension demonstrating the gradual introduction of PostgreSQL features like Functions, Data Types (CREATE TYPE, CREATE DOMAIN), and Operators.

    **Versions and Features:**
    @@ -124,21 +124,21 @@ This section provides concise summaries of the extensions developed during the p
    - **[v1.0.2](https://pgxn.org/dist/pg_sample_ext/1.0.2/)**
    - Included custom operator `@*` to perform multiplication on `my_type` values.

    #### 3) [pg_cext](https://pgxn.org/dist/pg_cext/1.0.0/)
    #### 3) [pg_cext](https://github.com/IshaanAdarsh/pg_cext)
    **Description:** Created the `pg_cext` extension to demonstrate PostgreSQL extensions developed using external languages, utilizing C for implementation.

    **Versions and Features:**
    - **[v1.0.0](https://pgxn.org/dist/pg_cext/1.0.0/)**
    - Implemented custom function `add_nums` in C to add two numbers together.

    #### 4) [pg_plpgsql_ext](https://pgxn.org/dist/pg_plpgsql_ext/1.0.0/)
    #### 4) [pg_plpgsql_ext](https://github.com/IshaanAdarsh/pg_plpgsql_ext)
    **Description:** Developed the `pg_plpgsql_ext` extension as an example of building extensions using procedural languages, specifically PL/pgSQL.

    **Versions and Features:**
    - **[v1.0.0](https://pgxn.org/dist/pg_plpgsql_ext/1.0.0/)**
    - Introduced custom function `subtract_numbers` to subtract two numbers using PL/pgSQL.

    #### 5) [pg_py_ext](https://pgxn.org/dist/pg_py_ext/1.0.0/)
    #### 5) [pg_py_ext](https://github.com/IshaanAdarsh/pg_py_ext)
    **Description:** Created the `pg_py_ext` extension to showcase extension development using procedural languages, specifically PL/Python3u.

    **Versions and Features:**
    @@ -153,11 +153,11 @@ The primary outcomes of my project include:
    1. **Tutorial on PostgreSQL Extension Development:** I have created a detailed tutorial that covers various aspects of extension development, including prerequisites, extension architecture, writing Makefiles, utilizing PGXS and PGXN tools, procedural and external languages, writing regression tests, and extension release management.

    2. **Creation of Example Extensions:** I have developed a set of example extensions, each showcasing different aspects of extension development using various techniques. I have uploaded the example extensions to the [PGXN (PostgreSQL Extension Network)](https://pgxn.org/) to ensure they are readily accessible to the PostgreSQL community. These extensions include:
    - `my_extension`: A simple SQL extension used as the centerpiece of the tutorial, demonstrating multiple features across different versions.
    - `pg_sample_ext`: A comprehensive example extension illustrating the gradual incorporation of functions, data types, and operators.
    - `pg_cext`: An extension developed in C to showcase extension development using external languages.
    - `pg_plpgsql_ext`: An extension developed using PL/pgSQL to demonstrate building extensions using procedural languages.
    - `pg_py_ext`: An extension developed using PL/Python3u to showcase extension development using procedural languages.
    - [`my_extension`](https://pgxn.org/dist/my_extension/1.1.0/): A simple SQL extension used as the centerpiece of the tutorial, demonstrating multiple features across different versions.
    - [`pg_sample_ext`](https://pgxn.org/dist/pg_sample_ext/1.0.2/): A comprehensive example extension illustrating the gradual incorporation of functions, data types, and operators.
    - [`pg_cext`](https://pgxn.org/dist/pg_cext/1.0.0/): An extension developed in C to showcase extension development using external languages.
    - [`pg_plpgsql_ext`](https://pgxn.org/dist/pg_plpgsql_ext/1.0.0/): An extension developed using PL/pgSQL to demonstrate building extensions using procedural languages.
    - [`pg_py_ext`](https://pgxn.org/dist/pg_py_ext/1.0.0/): An extension developed using PL/Python3u to showcase extension development using procedural languages.

    ## Future Work

  7. IshaanAdarsh revised this gist Aug 21, 2023. 1 changed file with 34 additions and 6 deletions.
    40 changes: 34 additions & 6 deletions GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -48,14 +48,42 @@ This project, "Comprehensive Postgres Extension Tutorial," aims to bridge the ga


    ## Contributions

    ### Prior to GSoC
    Started my journey with PostgreSQL in mid-March by delving into the project's intricacies. To demonstrate my progress to my mentor, I established a personal repository where I showcased my initial contributions. My exploration involved a comprehensive study of the extension ecosystem, enabling me to grasp its nuances.
    Started my journey with PostgreSQL in mid-March by delving into the project's intricacies. To demonstrate my progress to my mentor, I established a personal repository ([Postgres-extension-tutorial](https://github.com/IshaanAdarsh/Postgres-extension-tutorial)) where I showcased my initial contributions. My exploration involved a comprehensive study of the extension ecosystem, enabling me to grasp its nuances.

    In pursuit of understanding the project more deeply, I initiated the groundwork for the tasks ahead. By the first week of April, I had successfully outlined the pointers to be tackled, culminating in the completion of the first draft of my project plan. Additionally, the insights I gained while studying PostgreSQL's extension ecosystem provided me with valuable context and background information. This, in turn, facilitated the formulation of a [Project Proposal](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/blob/main/GSoC%202023%20PostgreSQL%20Project%20Proposal.pdf) that was informed, coherent, and aligned with the project's objectives.

    ### Contributions during GSoC
    These contributions collectively provided valuable insights into PostgreSQL extension development, showcasing a variety of techniques and illustrating the versatility of PostgreSQL's extensibility capabilities. The extensions and accompanying tutorials aimed to enhance the community's understanding of PostgreSQL's rich ecosystem.
    These contributions collectively provided valuable insights into PostgreSQL extension development, showcasing a variety of techniques and illustrating the versatility of PostgreSQL's extensibility capabilities.

    I authored the documentation in my personal GitHub repository -> [Postgres-extension-tutorial](https://github.com/IshaanAdarsh/Postgres-extension-tutorial)

    #### Pull Requests:
    | #Pull Request | Title | Status |
    | :--- | :---- | :-------: |
    | [Postgres-extension-tutorial#14](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/14) | docs: Added comprehensive extension development guide | ![badge](https://img.shields.io/badge/PR-Merged-blueviolet?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#25](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/25) | docs: Added process of extending PostgreSQL | ![badge](https://img.shields.io/badge/PR-Merged-blueviolet?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#32](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/32) | docs: Added comprehensive tutorial explaing Procedural Languges | ![badge](https://img.shields.io/badge/PR-Merged-blueviolet?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#33](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/33) | docs: Added comprehensive tutorial explaing External Languges | ![badge](https://img.shields.io/badge/PR-Merged-blueviolet?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#31](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/31) | docs: Added information about PGXN and `pgxnclient` | ![badge](https://img.shields.io/badge/PR-Merged-blueviolet?style=for-the-badge&logo=appveyor) |

    #### Issues:
    | Issue Link | Title | Status |
    |------------|-------|--------|
    | [Postgres-extension-tutorial#13](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/13) | Makefile issue in Creating Postgres Extension | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#15](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/15) | Regression testing Issue [Make installcheck] | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#17](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/17) | No function matches the given name and argument types | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#19](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/19) | Unknown META specification, cannot validate. [Spec v1.0.1] | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#20](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/20) | aggregate function calls cannot contain set-returning function calls | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#22](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/22) | ALTER EXTENSION ERROR no update path | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#23](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/23) | network error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#24](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/24) | gem ... (OptionParser::InvalidOption) invalid option: --no-rdoc | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#26](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/26) | Error while implementing Custom Operator in PostgreSQL | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#28](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/28) | Error while using CREATE EXTENSION command | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |
    | [Postgres-extension-tutorial#29](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/issues/29) | Issue in Installing PL/Python on Postgres | ![badge](https://img.shields.io/badge/Issue-Closed-red?style=for-the-badge&logo=appveyor) |

    ### A Brief Overview of Created Extensions:
    This section provides concise summaries of the extensions developed during the project, showcasing various aspects of PostgreSQL extension development:

    #### 1) [my_extension (Simple SQL Extension)](https://pgxn.org/dist/my_extension/1.1.0/)
    **Description:** Created the `my_extension` extension, which served as the centerpiece for the tutorial. The extension was used to demonstrate various aspects of PostgreSQL extension development.
    @@ -149,10 +177,10 @@ As a GSoC participant, I am committed to staying involved in the project and hel

    I extend my heartfelt gratitude to Google for hosting the Google Summer of Code program, providing a remarkable platform that enabled me to make a meaningful impact on the open-source community. This program has not only fostered personal growth but has also inspired my peers and immediate surroundings to embrace the world of open-source contributions.

    I would like to express my sincere appreciation to my mentor'a [Jimmy Angelakos]() and [David Wheeler]() for their support, invaluable guidance throughout the program. Their expertise and insights have been instrumental in shaping my journey and ensuring the success of my project.
    I would like to express my sincere appreciation to my mentor's David E. Wheeler(theory) and Jimmy Angelakos(vyruss) for their support, invaluable guidance throughout the program. Their expertise and insights have been instrumental in shaping my journey and ensuring the success of my project.

    I am also thankful to [jerrysv](), whose input and suggestions have played a crucial role in refining my project and enhancing its overall quality.
    I am also thankful to Jerry Sievert(JerrySievert), whose input and suggestions have played a crucial role in refining my project and enhancing its overall quality.

    Lastly, I am indebted to fellow contributors like [Rajiv Harlalka]() for their collaborative spirit and support. Their willingness to share knowledge and exchange ideas significantly contributed to the success of the project.
    Lastly, I am indebted to fellow contributors like Rajiv Harlalka(rajivharlalka) for their collaborative spirit and support. Their willingness to share knowledge and exchange ideas significantly contributed to the success of the project.

    Participating in this program has been an enriching and transformative experience, allowing me to delve into the realm of software engineering, enhance my research skills, and contribute meaningfully to the open-source community.
  8. IshaanAdarsh revised this gist Aug 20, 2023. 1 changed file with 26 additions and 17 deletions.
    43 changes: 26 additions & 17 deletions GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -29,8 +29,6 @@ I have included a dedicated section that intricately guides the process of exten

    ---

    <br />

    ## About the Organisation

    PostgreSQL, commonly known as Postgres, is a powerful, open-source relational database management system. It has a thriving and diverse community of developers, contributors, and users who collaborate to improve its features, performance, and ecosystem. As an essential part of the open-source software landscape, PostgreSQL supports extensibility, allowing developers to create custom extensions that enhance its functionality. The PostgreSQL community actively encourages developers to contribute extensions, which has led to the creation of a rich ecosystem of extensions catering to various use cases.
    @@ -82,8 +80,6 @@ These contributions collectively provided valuable insights into PostgreSQL exte
    - Added a new function called `multiply`.
    - Function takes two integers as input and returns their product.



    #### 2) [pg_sample_ext](https://pgxn.org/dist/pg_sample_ext/1.0.2/)
    **Description:** `pg_sample_ext` is a comprehensive example extension demonstrating the gradual introduction of PostgreSQL features like Functions, Data Types (CREATE TYPE, CREATE DOMAIN), and Operators.

    @@ -122,28 +118,41 @@ These contributions collectively provided valuable insights into PostgreSQL exte
    - Implemented custom function `add_nums` to add two numbers together using PL/Python3u.

    ## Outcome
    Throughout the Google Summer of Code 2023, my contributions have led to the creation of a comprehensive and user-friendly tutorial that guides developers through the process of writing PostgreSQL extensions. This tutorial aims to address the existing lack of clear documentation on this topic and provide newcomers with a quick start guide to extension development. The tutorial covers various essential aspects of extension development, making it easier for new contributors to get involved and contribute to the extension ecosystem.

    The primary outcomes of my project include:

    1. **Tutorial on PostgreSQL Extension Development:** I have created a detailed tutorial that covers various aspects of extension development, including prerequisites, extension architecture, writing Makefiles, utilizing PGXS and PGXN tools, procedural and external languages, writing regression tests, and extension release management.

    2. **Creation of Example Extensions:** I have developed a set of example extensions, each showcasing different aspects of extension development using various techniques. I have uploaded the example extensions to the [PGXN (PostgreSQL Extension Network)](https://pgxn.org/) to ensure they are readily accessible to the PostgreSQL community. These extensions include:
    - `my_extension`: A simple SQL extension used as the centerpiece of the tutorial, demonstrating multiple features across different versions.
    - `pg_sample_ext`: A comprehensive example extension illustrating the gradual incorporation of functions, data types, and operators.
    - `pg_cext`: An extension developed in C to showcase extension development using external languages.
    - `pg_plpgsql_ext`: An extension developed using PL/pgSQL to demonstrate building extensions using procedural languages.
    - `pg_py_ext`: An extension developed using PL/Python3u to showcase extension development using procedural languages.

    ## Future Work

    ## What's next?
    All the primary goals of my GSoC proposal are completed. However, there is a huge scope for improving the product.
    While the primary goals of my Google Summer of Code project have been successfully achieved, there remains a wide range of opportunities to further enhance and expand the project. Future contributors can build upon the foundation I've laid to bring even more value to the PostgreSQL community. Here are some potential avenues for future work:

    Here are a few things which can be done in the project for any future contributor:
    1. **Extension Examples:** Continue to add more extension examples that demonstrate unique features and scenarios (indexam and tableam). This can provide a broader understanding of the extensibility capabilities of PostgreSQL and cater to various use cases.

    Functional tests for casbin::SyncedEnforcer. The problem arised due to ambiguity in handling multi-threaded tests in GoogleTest.
    2. **Advanced Topics:** Extend the tutorial to cover advanced topics such as security considerations, error handling, and performance optimization when developing PostgreSQL extensions.

    Benchmarking for casbin::SyncedEnforcer. This one is related to the problem described above.
    3. **Testing Strategies:** Explore more comprehensive testing strategies, including functional tests, benchmarking, and performance testing, to ensure the reliability and efficiency of the extensions.

    Packaging of pycasbin as discussed in casbin-cpp#146. It is still difficult to install python bindings and we need some workflow to upload and update the package in pypi.org.
    4. **Support for New Languages:** Expand the tutorial to include examples of extension development using other programming languages, further broadening the scope of contributors and learners.

    Completion of the implementation of ABAC model within the internal API of casbin-cpp.
    As a GSoC participant, I am committed to staying involved in the project and helping the community with any future contributions. By working collectively, future contributors can take this project to new heights, empower more developers to create extensions, and enrich the PostgreSQL extension ecosystem.

    Inspecting and improving the metrics shown by the benchmarks for regular casbin::Enforcer as discussed in casbin-website#255.
    ## Acknowledgements

    I plan to work on these issues after the final evaluations are completed successfully and keep contributing to the project and help the organisation in their growth.
    I extend my heartfelt gratitude to Google for hosting the Google Summer of Code program, providing a remarkable platform that enabled me to make a meaningful impact on the open-source community. This program has not only fostered personal growth but has also inspired my peers and immediate surroundings to embrace the world of open-source contributions.

    ## Ackowledgement
    I'd like to thank Google for organizing such an amazing program for us and that it did create an impact on my immediate surroundings and peers to participate and contribute to opensource.
    I would like to express my sincere appreciation to my mentor'a [Jimmy Angelakos]() and [David Wheeler]() for their support, invaluable guidance throughout the program. Their expertise and insights have been instrumental in shaping my journey and ensuring the success of my project.

    Apart from that, I'd like to thank my mentor Jimmy Angelankos (vyruss) for their constant support and guidance and David Wheeler (thoery) for their suggestions during the program.
    I am also thankful to [jerrysv](), whose input and suggestions have played a crucial role in refining my project and enhancing its overall quality.

    This was a great experience for me! I learned a lot about software engineering and sharpen my researching skills through this opportunity.
    Lastly, I am indebted to fellow contributors like [Rajiv Harlalka]() for their collaborative spirit and support. Their willingness to share knowledge and exchange ideas significantly contributed to the success of the project.

    Participating in this program has been an enriching and transformative experience, allowing me to delve into the realm of software engineering, enhance my research skills, and contribute meaningfully to the open-source community.
  9. IshaanAdarsh revised this gist Aug 20, 2023. 1 changed file with 53 additions and 34 deletions.
    87 changes: 53 additions & 34 deletions GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -56,51 +56,70 @@ Started my journey with PostgreSQL in mid-March by delving into the project's in

    In pursuit of understanding the project more deeply, I initiated the groundwork for the tasks ahead. By the first week of April, I had successfully outlined the pointers to be tackled, culminating in the completion of the first draft of my project plan. Additionally, the insights I gained while studying PostgreSQL's extension ecosystem provided me with valuable context and background information. This, in turn, facilitated the formulation of a [Project Proposal](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/blob/main/GSoC%202023%20PostgreSQL%20Project%20Proposal.pdf) that was informed, coherent, and aligned with the project's objectives.

    ### Contributions during GSoC:
    #### Simple SQL - only extension Quick Start:
    This quick start covers:
    - Prerequisites
    - How to start writing said extensions
    - Makefile (included PGXS explanation), SQL script file and control files and their use.
    - Regression Testing using the make installcheck command.
    - Extension Upgradability: Altering and updating the extension using ALTER EXTENSION or DROP/CREATE EXTENSION.
    - Extension Management: Using this extension as an example of how to maintain an extension (changelog, README.md, docfile, etc. )
    - Extension Distribution: Added information about various distribution options. (Included information about PGXN in this part of the QS)
    ### Contributions during GSoC
    These contributions collectively provided valuable insights into PostgreSQL extension development, showcasing a variety of techniques and illustrating the versatility of PostgreSQL's extensibility capabilities. The extensions and accompanying tutorials aimed to enhance the community's understanding of PostgreSQL's rich ecosystem.

    https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/14
    #### 1) [my_extension (Simple SQL Extension)](https://pgxn.org/dist/my_extension/1.1.0/)
    **Description:** Created the `my_extension` extension, which served as the centerpiece for the tutorial. The extension was used to demonstrate various aspects of PostgreSQL extension development.

    #### Quick Start on extending PostgreSQL using the pg_sample_ext extension:
    pg_sample_ext is a sample extension that gradually introduces various extension features which include
    - Functions
    - Data Types
    - CREATE TYPE
    - CREATE DOMAIN
    - Operators
    **Tutorial Topics Covered:**
    - Prerequisites and extension architecture.
    - Writing a Makefile for building the extension.
    - Utilizing PGXS and PGXN tools for extension management.
    - Explanation of Procedural and External languages.
    - Writing regression tests to ensure extension reliability.
    - Insights into extension release management.

    https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/25
    **Versions and Features:**
    - **[v1.0.0](https://pgxn.org/dist/my_extension/1.0.0/)**
    - Created a custom table within the extension.

    #### Procedural Languages and QS (PL/pgSQL + PL/Python):
    - Definition of procedural languages and their implementation using plpgsql and plpython:
    https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/32
    - **[v1.0.1](https://pgxn.org/dist/my_extension/1.0.1/)**
    - Added a new function called `complex_add`.
    - Function takes an array of integers as input and returns their sum.

    #### External Language and QS (C):
    - Definition of external languages and its implementation using C also cover the role of PGXS and make command in detail (.so and .o files):
    https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/33
    - **[v1.1.0](https://pgxn.org/dist/my_extension/1.1.0/)**
    - Added a new function called `multiply`.
    - Function takes two integers as input and returns their product.

    #### QS for using PGXN and pgxnclient:
    - Added information about how to create a PGXN extension and information about all the available commands on the pgxnclient and how to use it properly.
    https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/31

    #### Extension Code:
    - my_extension v1.1.0: https://pgxn.org/dist/my_extension/1.1.0/

    - pg_sample_ext v1.0.2: https://pgxn.org/dist/pg_sample_ext/1.0.2/
    #### 2) [pg_sample_ext](https://pgxn.org/dist/pg_sample_ext/1.0.2/)
    **Description:** `pg_sample_ext` is a comprehensive example extension demonstrating the gradual introduction of PostgreSQL features like Functions, Data Types (CREATE TYPE, CREATE DOMAIN), and Operators.

    - pg_py_ext v1.0.0: https://github.com/IshaanAdarsh/Postgres-extension-tutorial/tree/main/Code/pg_py_ext
    **Versions and Features:**
    - **[v1.0.0](https://pgxn.org/dist/pg_sample_ext/1.0.0/)**
    - Added the `square` function to calculate the square of a number.

    - pg_plpgsql_ext v1.0.0: https://github.com/IshaanAdarsh/Postgres-extension-tutorial/tree/main/Code/pg_plpgsql_ext
    - **[v1.0.1](https://pgxn.org/dist/pg_sample_ext/1.0.1/)**
    - Introduced custom Data Types.
    - Composite Type: Introduced `person_type`, representing a person's name and age.
    - Enumerated Type: Introduced `status_type` with values 'active', 'inactive', and 'pending'.
    - Domain Type: Added `positive_integer` to handle positive integer values with enhanced data validation.

    - pg_cext v1.0.0: https://github.com/IshaanAdarsh/Postgres-extension-tutorial/tree/main/Code/pg_cext
    - **[v1.0.2](https://pgxn.org/dist/pg_sample_ext/1.0.2/)**
    - Included custom operator `@*` to perform multiplication on `my_type` values.

    #### 3) [pg_cext](https://pgxn.org/dist/pg_cext/1.0.0/)
    **Description:** Created the `pg_cext` extension to demonstrate PostgreSQL extensions developed using external languages, utilizing C for implementation.

    **Versions and Features:**
    - **[v1.0.0](https://pgxn.org/dist/pg_cext/1.0.0/)**
    - Implemented custom function `add_nums` in C to add two numbers together.

    #### 4) [pg_plpgsql_ext](https://pgxn.org/dist/pg_plpgsql_ext/1.0.0/)
    **Description:** Developed the `pg_plpgsql_ext` extension as an example of building extensions using procedural languages, specifically PL/pgSQL.

    **Versions and Features:**
    - **[v1.0.0](https://pgxn.org/dist/pg_plpgsql_ext/1.0.0/)**
    - Introduced custom function `subtract_numbers` to subtract two numbers using PL/pgSQL.

    #### 5) [pg_py_ext](https://pgxn.org/dist/pg_py_ext/1.0.0/)
    **Description:** Created the `pg_py_ext` extension to showcase extension development using procedural languages, specifically PL/Python3u.

    **Versions and Features:**
    - **[v1.0.0](https://pgxn.org/dist/pg_py_ext/1.0.0/)**
    - Implemented custom function `add_nums` to add two numbers together using PL/Python3u.

    ## Outcome

  10. IshaanAdarsh revised this gist Aug 19, 2023. 1 changed file with 42 additions and 6 deletions.
    48 changes: 42 additions & 6 deletions GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -57,14 +57,50 @@ Started my journey with PostgreSQL in mid-March by delving into the project's in
    In pursuit of understanding the project more deeply, I initiated the groundwork for the tasks ahead. By the first week of April, I had successfully outlined the pointers to be tackled, culminating in the completion of the first draft of my project plan. Additionally, the insights I gained while studying PostgreSQL's extension ecosystem provided me with valuable context and background information. This, in turn, facilitated the formulation of a [Project Proposal](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/blob/main/GSoC%202023%20PostgreSQL%20Project%20Proposal.pdf) that was informed, coherent, and aligned with the project's objectives.

    ### Contributions during GSoC:
    Here is the list of contributions I made during the coding period of GSoC i.e. 8th June 2021 to 18th August 2021.
    Weekly blogs/reports can be found at [https://gsoc.casbin.org](https://gsoc.casbin.org/).
    #### Simple SQL - only extension Quick Start:
    This quick start covers:
    - Prerequisites
    - How to start writing said extensions
    - Makefile (included PGXS explanation), SQL script file and control files and their use.
    - Regression Testing using the make installcheck command.
    - Extension Upgradability: Altering and updating the extension using ALTER EXTENSION or DROP/CREATE EXTENSION.
    - Extension Management: Using this extension as an example of how to maintain an extension (changelog, README.md, docfile, etc. )
    - Extension Distribution: Added information about various distribution options. (Included information about PGXN in this part of the QS)

    I also documented my progress in a [separate gist](https://gist.github.com/EmperorYP7/25eacba56533d44d323f264a16754445).
    https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/14

    The entirety of my contributions during the coding period includes 31 Pull Requests (30 Merged, 1 Closed) and 7 issues which accounts for 18,867 lines of code added and 6,730 lines of code deleted in casbin-cpp. The entire list of my contributions in `casbin-cpp` can be accessed [here](https://github.com/casbin/casbin-cpp/issues?q=author%3AEmperorYP7).
    #### Quick Start on extending PostgreSQL using the pg_sample_ext extension:
    pg_sample_ext is a sample extension that gradually introduces various extension features which include
    - Functions
    - Data Types
    - CREATE TYPE
    - CREATE DOMAIN
    - Operators

    [![Screenshot](https://user-images.githubusercontent.com/62606998/130235683-08bc682a-fc6b-42de-94c8-ca18bddc56e8.png)](https://user-images.githubusercontent.com/62606998/130235683-08bc682a-fc6b-42de-94c8-ca18bddc56e8.png)
    https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/25

    #### Procedural Languages and QS (PL/pgSQL + PL/Python):
    - Definition of procedural languages and their implementation using plpgsql and plpython:
    https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/32

    #### External Language and QS (C):
    - Definition of external languages and its implementation using C also cover the role of PGXS and make command in detail (.so and .o files):
    https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/33

    #### QS for using PGXN and pgxnclient:
    - Added information about how to create a PGXN extension and information about all the available commands on the pgxnclient and how to use it properly.
    https://github.com/IshaanAdarsh/Postgres-extension-tutorial/pull/31

    #### Extension Code:
    - my_extension v1.1.0: https://pgxn.org/dist/my_extension/1.1.0/

    - pg_sample_ext v1.0.2: https://pgxn.org/dist/pg_sample_ext/1.0.2/

    - pg_py_ext v1.0.0: https://github.com/IshaanAdarsh/Postgres-extension-tutorial/tree/main/Code/pg_py_ext

    - pg_plpgsql_ext v1.0.0: https://github.com/IshaanAdarsh/Postgres-extension-tutorial/tree/main/Code/pg_plpgsql_ext

    - pg_cext v1.0.0: https://github.com/IshaanAdarsh/Postgres-extension-tutorial/tree/main/Code/pg_cext

    ## Outcome

    @@ -88,7 +124,7 @@ I plan to work on these issues after the final evaluations are completed success
    ## Ackowledgement
    I'd like to thank Google for organizing such an amazing program for us and that it did create an impact on my immediate surroundings and peers to participate and contribute to opensource.

    Apart from that, I'd like to thank my mentor Yang Luo (vyruss) for their constant support and guidance and Joey (thoery) for their suggestions during the program.
    Apart from that, I'd like to thank my mentor Jimmy Angelankos (vyruss) for their constant support and guidance and David Wheeler (thoery) for their suggestions during the program.

    This was a great experience for me! I learned a lot about software engineering and sharpen my researching skills through this opportunity.

  11. IshaanAdarsh revised this gist Aug 16, 2023. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -52,7 +52,9 @@ This project, "Comprehensive Postgres Extension Tutorial," aims to bridge the ga
    ## Contributions

    ### Prior to GSoC
    I've been contributing toPostgreSQL prior to GSoC coding period. This is when I got introduced to the project. I tackled some good first issues and learnt about the codebase. Major contributions include the implementation of SyncedEnforcer along with the unit tests. Here are my contributions:
    Started my journey with PostgreSQL in mid-March by delving into the project's intricacies. To demonstrate my progress to my mentor, I established a personal repository where I showcased my initial contributions. My exploration involved a comprehensive study of the extension ecosystem, enabling me to grasp its nuances.

    In pursuit of understanding the project more deeply, I initiated the groundwork for the tasks ahead. By the first week of April, I had successfully outlined the pointers to be tackled, culminating in the completion of the first draft of my project plan. Additionally, the insights I gained while studying PostgreSQL's extension ecosystem provided me with valuable context and background information. This, in turn, facilitated the formulation of a [Project Proposal](https://github.com/IshaanAdarsh/Postgres-extension-tutorial/blob/main/GSoC%202023%20PostgreSQL%20Project%20Proposal.pdf) that was informed, coherent, and aligned with the project's objectives.

    ### Contributions during GSoC:
    Here is the list of contributions I made during the coding period of GSoC i.e. 8th June 2021 to 18th August 2021.
  12. IshaanAdarsh revised this gist Aug 15, 2023. 1 changed file with 69 additions and 14 deletions.
    83 changes: 69 additions & 14 deletions GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -8,30 +8,85 @@

    ## Introduction

    - **Name:** Ishaan Adarsh ([@IshaanAdarsh](https://github.com/IshaanAdarsh))
    - **Organisation:** [Postgres](https://github.com/postgres)
    - **Project link:** https://summerofcode.withgoogle.com/programs/2023/projects/vxDUiu3f
    - **Repository link:** https://github.com/postgres/postgres/tree/master/doc
    - **Project Name:** Postgres extension tutorial / quick start
    - **Project Summary:** This project aims to create a comprehensive and easy-to-follow tutorial on how to write a Postgres extension, addressing the current lack of clear documentation on the topic. The tutorial will assume only knowledge of Postgres and the target language, and will cover topics such as writing a Makefile, using PGXS and PGXN, writing regression tests, and extension release management. The tutorial will be a quick start guide with clear examples, making it easy for new contributors to understand and follow along. The deliverables of this project will be the tutorial itself, along with any necessary code examples and documentation updates. This project will be valuable for the Postgres community by making it easier for new contributors to get involved and contribute to the extension ecosystem.
    **Name:** Ishaan Adarsh ([@IshaanAdarsh](https://github.com/IshaanAdarsh))

    **Organisation:** [Postgres](https://github.com/postgres)

    **Project link:** https://summerofcode.withgoogle.com/programs/2023/projects/vxDUiu3f

    **Repository link:** https://github.com/postgres/postgres/tree/master/doc

    **Project Name:** Postgres extension tutorial / quick start

    **Project Summary:** This project aims to create a comprehensive and easy-to-follow tutorial on how to write a Postgres extension, addressing the current lack of clear documentation on the topic. The tutorial will assume only knowledge of Postgres and the target language, and will cover topics such as
    - Writing a Makefile
    - Using PGXS and PGXN
    - Explaining Procedural and External languages
    - Writing regression tests
    - Extension release management. In addition,

    I have included a dedicated section that intricately guides the process of extending PostgreSQL through the incorporation of Functions, Data Types, and Operators. The tutorial will be a quick start guide with clear examples, making it easy for new contributors to understand and follow along. The deliverables of this project will be the tutorial itself, along with any necessary code examples and documentation updates. This project will be valuable for the Postgres community by making it easier for new contributors to get involved and contribute to the extension ecosystem.

    ---

    <br />

    ## **About the Project:**
    ## About the Organisation

    PostgreSQL, commonly known as Postgres, is a powerful, open-source relational database management system. It has a thriving and diverse community of developers, contributors, and users who collaborate to improve its features, performance, and ecosystem. As an essential part of the open-source software landscape, PostgreSQL supports extensibility, allowing developers to create custom extensions that enhance its functionality. The PostgreSQL community actively encourages developers to contribute extensions, which has led to the creation of a rich ecosystem of extensions catering to various use cases.

    This project addresses the current lack of clear documentation on writing Postgres extensions. The goal is to create an accessible tutorial that assumes familiarity with Postgres and the target language. It covers essential topics like
    - Writing a Makefile
    - Utilizing PGXS and PGXN
    - Explaining Procedural and External Languages
    - Writing Regression Tests
    - Extension Release Management.
    ## The PostgreSQL Extension Ecosystem:

    Additionally, a dedicated section guides the extension process using Functions, Data Types, and Operators. The tutorial, with concise examples, facilitates new contributors' understanding, empowering them to participate in the extension ecosystem. Deliverables include the tutorial, code examples, and documentation updates, enhancing the ease of involvement for new contributors within the Postgres community.
    The extension ecosystem of PostgreSQL contributes significantly to its adaptability and versatility. Developers can build extensions to add specialized functionality, ranging from advanced data types to complex procedural languages. These extensions integrate seamlessly with PostgreSQL, enhancing its capabilities without modifying its core codebase. Such extensibility allows developers to tailor their PostgreSQL databases to suit specific application requirements.

    This project, "Comprehensive Postgres Extension Tutorial," aims to bridge the gap in documentation and provide a comprehensive guide for creating PostgreSQL extensions. By doing so, it enables developers to contribute to the extension ecosystem more effectively, fostering innovation and collaboration within the PostgreSQL community.

    <br>
    <p align="center">

    ![GSoC(PostgreSQL)](https://user-images.githubusercontent.com/100434702/260283709-934030bc-897c-4f90-85f0-c0460c6f74d0.png)

    </p>


    ## Contributions

    ### Prior to GSoC
    I've been contributing toPostgreSQL prior to GSoC coding period. This is when I got introduced to the project. I tackled some good first issues and learnt about the codebase. Major contributions include the implementation of SyncedEnforcer along with the unit tests. Here are my contributions:

    ### Contributions during GSoC:
    Here is the list of contributions I made during the coding period of GSoC i.e. 8th June 2021 to 18th August 2021.
    Weekly blogs/reports can be found at [https://gsoc.casbin.org](https://gsoc.casbin.org/).

    I also documented my progress in a [separate gist](https://gist.github.com/EmperorYP7/25eacba56533d44d323f264a16754445).

    The entirety of my contributions during the coding period includes 31 Pull Requests (30 Merged, 1 Closed) and 7 issues which accounts for 18,867 lines of code added and 6,730 lines of code deleted in casbin-cpp. The entire list of my contributions in `casbin-cpp` can be accessed [here](https://github.com/casbin/casbin-cpp/issues?q=author%3AEmperorYP7).

    [![Screenshot](https://user-images.githubusercontent.com/62606998/130235683-08bc682a-fc6b-42de-94c8-ca18bddc56e8.png)](https://user-images.githubusercontent.com/62606998/130235683-08bc682a-fc6b-42de-94c8-ca18bddc56e8.png)

    ## Outcome

    ## What's next?
    All the primary goals of my GSoC proposal are completed. However, there is a huge scope for improving the product.

    Here are a few things which can be done in the project for any future contributor:

    Functional tests for casbin::SyncedEnforcer. The problem arised due to ambiguity in handling multi-threaded tests in GoogleTest.

    Benchmarking for casbin::SyncedEnforcer. This one is related to the problem described above.

    Packaging of pycasbin as discussed in casbin-cpp#146. It is still difficult to install python bindings and we need some workflow to upload and update the package in pypi.org.

    Completion of the implementation of ABAC model within the internal API of casbin-cpp.

    Inspecting and improving the metrics shown by the benchmarks for regular casbin::Enforcer as discussed in casbin-website#255.

    I plan to work on these issues after the final evaluations are completed successfully and keep contributing to the project and help the organisation in their growth.

    ## Ackowledgement
    I'd like to thank Google for organizing such an amazing program for us and that it did create an impact on my immediate surroundings and peers to participate and contribute to opensource.

    Apart from that, I'd like to thank my mentor Yang Luo (vyruss) for their constant support and guidance and Joey (thoery) for their suggestions during the program.

    This was a great experience for me! I learned a lot about software engineering and sharpen my researching skills through this opportunity.

  13. IshaanAdarsh revised this gist Aug 13, 2023. 1 changed file with 19 additions and 0 deletions.
    19 changes: 19 additions & 0 deletions GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -16,3 +16,22 @@
    - **Project Summary:** This project aims to create a comprehensive and easy-to-follow tutorial on how to write a Postgres extension, addressing the current lack of clear documentation on the topic. The tutorial will assume only knowledge of Postgres and the target language, and will cover topics such as writing a Makefile, using PGXS and PGXN, writing regression tests, and extension release management. The tutorial will be a quick start guide with clear examples, making it easy for new contributors to understand and follow along. The deliverables of this project will be the tutorial itself, along with any necessary code examples and documentation updates. This project will be valuable for the Postgres community by making it easier for new contributors to get involved and contribute to the extension ecosystem.

    ---

    <br />

    ## **About the Project:**

    This project addresses the current lack of clear documentation on writing Postgres extensions. The goal is to create an accessible tutorial that assumes familiarity with Postgres and the target language. It covers essential topics like
    - Writing a Makefile
    - Utilizing PGXS and PGXN
    - Explaining Procedural and External Languages
    - Writing Regression Tests
    - Extension Release Management.

    Additionally, a dedicated section guides the extension process using Functions, Data Types, and Operators. The tutorial, with concise examples, facilitates new contributors' understanding, empowering them to participate in the extension ecosystem. Deliverables include the tutorial, code examples, and documentation updates, enhancing the ease of involvement for new contributors within the Postgres community.

    <p align="center">

    ![GSoC(PostgreSQL)](https://user-images.githubusercontent.com/100434702/260283709-934030bc-897c-4f90-85f0-c0460c6f74d0.png)

    </p>
  14. IshaanAdarsh revised this gist Aug 12, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    <br />


    ![gsoc](https://user-images.githubusercontent.com/100434702/260257103-40ffb222-8441-4c39-a733-18ac46e51a89.png)

    <br />

  15. IshaanAdarsh revised this gist Aug 12, 2023. No changes.
  16. IshaanAdarsh revised this gist Aug 12, 2023. No changes.
  17. IshaanAdarsh revised this gist Aug 12, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    <br />

    ![Group 15](https://user-images.githubusercontent.com/62606998/119636061-e9caf780-be31-11eb-84f2-632400dd3789.png)


    <br />

  18. IshaanAdarsh revised this gist Aug 12, 2023. 1 changed file with 18 additions and 1 deletion.
    19 changes: 18 additions & 1 deletion GSoC ’23 Project-Report.md
    Original file line number Diff line number Diff line change
    @@ -1 +1,18 @@
    Something
    # Google Summer of Code 2023 Final Work Product

    <br />

    ![Group 15](https://user-images.githubusercontent.com/62606998/119636061-e9caf780-be31-11eb-84f2-632400dd3789.png)

    <br />

    ## Introduction

    - **Name:** Ishaan Adarsh ([@IshaanAdarsh](https://github.com/IshaanAdarsh))
    - **Organisation:** [Postgres](https://github.com/postgres)
    - **Project link:** https://summerofcode.withgoogle.com/programs/2023/projects/vxDUiu3f
    - **Repository link:** https://github.com/postgres/postgres/tree/master/doc
    - **Project Name:** Postgres extension tutorial / quick start
    - **Project Summary:** This project aims to create a comprehensive and easy-to-follow tutorial on how to write a Postgres extension, addressing the current lack of clear documentation on the topic. The tutorial will assume only knowledge of Postgres and the target language, and will cover topics such as writing a Makefile, using PGXS and PGXN, writing regression tests, and extension release management. The tutorial will be a quick start guide with clear examples, making it easy for new contributors to understand and follow along. The deliverables of this project will be the tutorial itself, along with any necessary code examples and documentation updates. This project will be valuable for the Postgres community by making it easier for new contributors to get involved and contribute to the extension ecosystem.

    ---
  19. IshaanAdarsh renamed this gist Aug 12, 2023. 1 changed file with 0 additions and 0 deletions.
  20. IshaanAdarsh renamed this gist Aug 12, 2023. 1 changed file with 0 additions and 0 deletions.
  21. IshaanAdarsh renamed this gist Aug 12, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  22. IshaanAdarsh created this gist Aug 12, 2023.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    Something