Enroll in PostgreSQL Courses
Get Started
Use Code 'DBGRP30' for 30% OffCategory
-
Join 160 other subscribers
Top Posts & Pages
Archives
-
Recent Posts
- Why Ora2Pg Should Be Your First Stop for PostgreSQL Conversion March 31, 2026
- Oracle & SQL Server to PostgreSQL – Migration Tooling Gotchas No One Warns You About! March 27, 2026
- PostgreSQL Sequence Reset: START WITH vs RESTART WITH vs SETVAL Explained March 21, 2026
- PGConf India 2026: PostgreSQL Query Tuning: A Foundation Every Database Developer Should Build March 13, 2026
- Same SQL, Different Results: A Subtle Oracle vs PostgreSQL Migration Bug January 30, 2026
- PostgreSQL Table Rename and Views – An OID Story January 5, 2026
- PostgreSQL Partition Pruning: The Role of Function Volatility November 4, 2025
- Exploring PostgreSQL 18: A Developer’s Guide to New Features – Part 1: The COPY Command Gets More User-Friendly September 28, 2025
- PostgreSQL Case-Insensitive Search: Handling LIKE with Nondeterministic Collations September 6, 2025
- PostgreSQL 18 Beta Preview – Export or Amend Statistics with Ease May 10, 2025
- Understanding Volatility in PL/pgSQL Functions: A Real-World Lesson November 10, 2024
- PL/pgSQL Secrets: How Conditional Expressions Are Parsed and Evaluated Under the Hood. November 2, 2024
-
Enhance your PostgreSQL skills! Master Database Development and Migration with my course. Click here to start!
Tag Archives: plpgsql
Same SQL, Different Results: A Subtle Oracle vs PostgreSQL Migration Bug
The article examines issues encountered when migrating an Oracle application to PostgreSQL, particularly differences in operator precedence and implicit casting. A case study reveals how similar SQL expressions yield different results due to inherent database behaviors. The piece emphasizes the need for explicit intent in SQL to avoid silent data corruption and bugs post-migration. Continue reading
Posted in Oracle Internal, Oracle to, Oracle to PG migration, postgresql
Tagged Concat, implicit conversion, oracle, plpgsql, PLSQL, postgresql
2 Comments
Understanding Volatility in PL/pgSQL Functions: A Real-World Lesson
The PL/pgSQL language in PostgreSQL allows developers to create complex database functions with prescribed volatility categories: IMMUTABLE, STABLE, and VOLATILE. Selecting the right volatility is crucial for maintaining performance and data consistency, especially during migrations from other databases. Careful consideration prevents unexpected results and enhances application reliability. Continue reading
Posted in postgresql
Tagged database, function, immutable, performance, PL/pgSQL, plpgsql, postgres, postgresql, SQL, stable
2 Comments
PL/pgSQL Secrets: How Conditional Expressions Are Parsed and Evaluated Under the Hood.
In a recent discussion on PostgreSQL Slack, a user noted that a seemingly incomplete PL/pgSQL IF statement did not cause a syntax error. The condition is processed using a SELECT statement, allowing flexibility in evaluation. This insight enables developers to creatively incorporate SELECT elements into conditional statements without triggering errors. Continue reading
Posted in postgresql
Tagged course, database, plpgsql, postgres, postgresql, Procedural Development, SQL
1 Comment
Exploring PostgreSQL 17: A Developer’s Guide to New Features – Part 1 – PL/pgSQL
PostgreSQL 17 Beta, released on May 23, 2024, introduces new features for database developers and migration engineers. One notable addition is the ability to declare array types directly based on underlying database objects, enhancing code readability and maintainability. These enhancements empower developers to leverage the full potential of PostgreSQL 17 in their projects. Continue reading
Posted in postgresql
Tagged 17, beta, conversion, database, new feature, plpgsql, postgres, postgresql, PostgreSQL 17, programming, SQL
10 Comments
Conversion Gotchas: Implicit Conversion in Oracle to PostgreSQL Migration
Introduction – Implicit Conversion Oracle to PostgreSQL migration is a playground that uncovers and touches upon many database concepts, which are always intriguing and fun to explore. Implicit Conversion, i.e., imposing automatic conversion on data types to make them comparable … Continue reading
Posted in Oracle to PG migration, postgresql
Tagged database, error, implicit conversion, migration, operator, oracle, plpgsql, postgres, postgresql, SQL
1 Comment
PL\pgSQL Conversion Gotchas : Functions with Out parameter and return type.
If you’re fascinated by the internals of PL/pgSQL processing and want to handle it efficiently, especially if you’re migrating procedural logic from another database, be sure to check out the previous posts in the series on PL/pgSQL Conversion Gotchas – … Continue reading
Posted in postgresql
Tagged conversion, database, development, migration, oracle, plpgsql, postgresql
Leave a comment
PL/pgSQL Conversion Gotchas: Cursors and Last Fetch.
Databases Cursors are one of the key components of development. We have been using them for traversing query results for processing based on business logic or functionality. In Code Conversion, Cursor code always needs to be ported either from PL\SQL … Continue reading
Posted in Oracle to PG migration, postgresql
Tagged conversion, cursor, database, for loop, found, oracle, plpgsql, PLSQL, postgresql, programming
2 Comments