Christopher Travers
Christopher Travers DeliveryHero SE
10:00 03 February
180 мин

Extending PostgreSQL in C: A Tutorial

PostgreSQL is one of the most readily extensible databases in the world. Custom data types, aggregations, functions, and more can be easily and safely written in C.

This hands-on tutorial covers the basics of writing functions, data types, and aggregates in C. It is recommended (though not strictly required) that bring their own laptops and be prepared to actually try the exercises.

Topics covered include: 1. The PostgreSQL type system 2. Creating a simple custom type in C 3. Common errors for non-C programmers 4. Creating a simple aggregate in C

There will be many opportunities for questions and discussion through the tutorial.



Другие доклады

  • Anton Doroshkevich
    Anton Doroshkevich ИнфоСофт
    180 мин

    PostgreSQL configuration master class for 1C

    You will have a fascinating journey through PostgreSQL settings. We will talk about that with 1C not so or on the contrary so that under it it is necessary to adjust specially DBMS. We will discuss approaches to testing the speed of 1C. Consider the various options for backup schemes and fault tolerance. In the process, we will compare the speed of 1C on PostgreSQL configured by default with the speed of 1C configured for PostgreSQL. Also, we will create a replica of PostgreSQL, and switch to it the 1C Server "live", see what users will see 1C during this operation. And a separate block will be devoted to Postgres Pro Enterprise Edition, how the use of its advantages affects the speed of 1C.

  • Александр Чирков
    Александр Чирков Барс Груп
    Александр Кварацхелия
    Александр Кварацхелия БАРС Груп
    45 мин

    Migration from Oracle to PostgreSQL using an automatic converter

    In the report, we want to talk about the experience of migrating one large system from Oracle to PostgreSQL. The system itself was built on the PHP + Oracle stack; its distinguishing feature was that all business logic was implemented in PL / SQL code. In a DBMS, there are more than 3000 packages with 4-10 functions (procedures) in each. In PHP - more than 10,000 forms with inserts of anonymous blocks used to receive data, process and save results in Oracle.

    To solve this extremely voluminous work, we took ANTLR4 (a powerful parser generator for reading, processing, executing, or translating structured text), PL/SQL grammar, and created an automatic converter that allows you to convert all objects in the schema and our system from Oracle to working code for PostgreSQL.

  • Alexey Fadeev
    Alexey Fadeev Sibedge
    22 мин

    GraphQL backend on PostgreSQL with plv8.

    Recently, I was working on a project where graphQL was used for sending requests to its .NET Core backend, but this was not a good idea. The point is, a graphQL query is a hierarchical structure with a dynamic set of fields. It’s difficult to perform such requests via a statically-typed programming language and a relational database as suggested by the tools available. So, I came up with the idea of using the plv8 extension and perform graphQL queries right on the database side. It took me about two hours to develop a working prototype that could perform the same queries as the software under development for more than one month! Then various improvements have been made and I want to introduce them all. If you are thinking of using graphQL instead of REST, my speech could be most useful and could help you to save a lot of time.

  • Pavel Stehule
    Pavel Stehule freelancer
    90 мин

    The possibilities of profiling plpgsql code - available tools

    I like stored procedures - it is great technology. But like any other technologies it allows to write not well optimized code. It is not easy to write optimized code, sql statements in complex large applications. On second hand, there are some tools, that can be used very easily, that can help. Postgres has built-in tracking functions possibility. There are PLProfiler and plpgsql_check. With these tools is easy work to detect slow part of applications.With this knowledge, the fix of performance issue is less magic.