pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Improve plpgsql's ability to handle arguments declared as RECORD 6+ messages / 1 participants [nested] [flat]
* pgsql: Improve plpgsql's ability to handle arguments declared as RECORD @ 2022-09-16 17:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-09-16 17:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve plpgsql's ability to handle arguments declared as RECORD. Treat arguments declared as RECORD as if that were a polymorphic type (which it is, sort of), in that we substitute the actual argument type while forming the function cache lookup key. This allows the specific composite type to be known in some cases where it was not before, at the cost of making a separate function cache entry for each named composite type that's passed to the function during a session. The particular symptom discussed in bug #17610 could be solved in other more-efficient ways, but only at the cost of considerable development work, and there are other cases where we'd still fail without this. Per bug #17610 from Martin Jurča. Back-patch to v11 where we first allowed plpgsql functions to be declared as taking type RECORD. Discussion: https://postgr.es/m/17610-fb1eef75bf6c2364@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/bfd6b3bc4e19db19289ae92a17799edae2cdd5f3 Modified Files -------------- src/pl/plpgsql/src/expected/plpgsql_record.out | 35 ++++++++++++++++++++++++++ src/pl/plpgsql/src/pl_comp.c | 34 ++++++++++++++++++++++--- src/pl/plpgsql/src/sql/plpgsql_record.sql | 11 ++++++++ 3 files changed, 76 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve plpgsql's ability to handle arguments declared as RECORD @ 2022-09-16 17:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-09-16 17:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve plpgsql's ability to handle arguments declared as RECORD. Treat arguments declared as RECORD as if that were a polymorphic type (which it is, sort of), in that we substitute the actual argument type while forming the function cache lookup key. This allows the specific composite type to be known in some cases where it was not before, at the cost of making a separate function cache entry for each named composite type that's passed to the function during a session. The particular symptom discussed in bug #17610 could be solved in other more-efficient ways, but only at the cost of considerable development work, and there are other cases where we'd still fail without this. Per bug #17610 from Martin Jurča. Back-patch to v11 where we first allowed plpgsql functions to be declared as taking type RECORD. Discussion: https://postgr.es/m/17610-fb1eef75bf6c2364@postgresql.org Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b759bb6714f03e91071b8fe6d29c28a1f87ea4bb Modified Files -------------- src/pl/plpgsql/src/expected/plpgsql_record.out | 35 ++++++++++++++++++++++++++ src/pl/plpgsql/src/pl_comp.c | 34 ++++++++++++++++++++++--- src/pl/plpgsql/src/sql/plpgsql_record.sql | 11 ++++++++ 3 files changed, 76 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve plpgsql's ability to handle arguments declared as RECORD @ 2022-09-16 17:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-09-16 17:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve plpgsql's ability to handle arguments declared as RECORD. Treat arguments declared as RECORD as if that were a polymorphic type (which it is, sort of), in that we substitute the actual argument type while forming the function cache lookup key. This allows the specific composite type to be known in some cases where it was not before, at the cost of making a separate function cache entry for each named composite type that's passed to the function during a session. The particular symptom discussed in bug #17610 could be solved in other more-efficient ways, but only at the cost of considerable development work, and there are other cases where we'd still fail without this. Per bug #17610 from Martin Jurča. Back-patch to v11 where we first allowed plpgsql functions to be declared as taking type RECORD. Discussion: https://postgr.es/m/17610-fb1eef75bf6c2364@postgresql.org Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b3b88d7480b81a7622045a88682296c8d4683dbf Modified Files -------------- src/pl/plpgsql/src/expected/plpgsql_record.out | 35 ++++++++++++++++++++++++++ src/pl/plpgsql/src/pl_comp.c | 34 ++++++++++++++++++++++--- src/pl/plpgsql/src/sql/plpgsql_record.sql | 11 ++++++++ 3 files changed, 76 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve plpgsql's ability to handle arguments declared as RECORD @ 2022-09-16 17:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-09-16 17:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve plpgsql's ability to handle arguments declared as RECORD. Treat arguments declared as RECORD as if that were a polymorphic type (which it is, sort of), in that we substitute the actual argument type while forming the function cache lookup key. This allows the specific composite type to be known in some cases where it was not before, at the cost of making a separate function cache entry for each named composite type that's passed to the function during a session. The particular symptom discussed in bug #17610 could be solved in other more-efficient ways, but only at the cost of considerable development work, and there are other cases where we'd still fail without this. Per bug #17610 from Martin Jurča. Back-patch to v11 where we first allowed plpgsql functions to be declared as taking type RECORD. Discussion: https://postgr.es/m/17610-fb1eef75bf6c2364@postgresql.org Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7391ab28a63f4b40cec03dc83eb7383a4eac8fda Modified Files -------------- src/pl/plpgsql/src/expected/plpgsql_record.out | 35 ++++++++++++++++++++++++++ src/pl/plpgsql/src/pl_comp.c | 34 ++++++++++++++++++++++--- src/pl/plpgsql/src/sql/plpgsql_record.sql | 11 ++++++++ 3 files changed, 76 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve plpgsql's ability to handle arguments declared as RECORD @ 2022-09-16 17:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-09-16 17:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve plpgsql's ability to handle arguments declared as RECORD. Treat arguments declared as RECORD as if that were a polymorphic type (which it is, sort of), in that we substitute the actual argument type while forming the function cache lookup key. This allows the specific composite type to be known in some cases where it was not before, at the cost of making a separate function cache entry for each named composite type that's passed to the function during a session. The particular symptom discussed in bug #17610 could be solved in other more-efficient ways, but only at the cost of considerable development work, and there are other cases where we'd still fail without this. Per bug #17610 from Martin Jurča. Back-patch to v11 where we first allowed plpgsql functions to be declared as taking type RECORD. Discussion: https://postgr.es/m/17610-fb1eef75bf6c2364@postgresql.org Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c18d946e2352e0909cdb5aa4548ebe569ebb9fcb Modified Files -------------- src/pl/plpgsql/src/expected/plpgsql_record.out | 35 ++++++++++++++++++++++++++ src/pl/plpgsql/src/pl_comp.c | 34 ++++++++++++++++++++++--- src/pl/plpgsql/src/sql/plpgsql_record.sql | 11 ++++++++ 3 files changed, 76 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve plpgsql's ability to handle arguments declared as RECORD @ 2022-09-16 17:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-09-16 17:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve plpgsql's ability to handle arguments declared as RECORD. Treat arguments declared as RECORD as if that were a polymorphic type (which it is, sort of), in that we substitute the actual argument type while forming the function cache lookup key. This allows the specific composite type to be known in some cases where it was not before, at the cost of making a separate function cache entry for each named composite type that's passed to the function during a session. The particular symptom discussed in bug #17610 could be solved in other more-efficient ways, but only at the cost of considerable development work, and there are other cases where we'd still fail without this. Per bug #17610 from Martin Jurča. Back-patch to v11 where we first allowed plpgsql functions to be declared as taking type RECORD. Discussion: https://postgr.es/m/17610-fb1eef75bf6c2364@postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/56d45fdab7b12cd0c767a8c1e7ab6c04390a32d8 Modified Files -------------- src/pl/plpgsql/src/expected/plpgsql_record.out | 35 ++++++++++++++++++++++++++ src/pl/plpgsql/src/pl_comp.c | 34 ++++++++++++++++++++++--- src/pl/plpgsql/src/sql/plpgsql_record.sql | 11 ++++++++ 3 files changed, 76 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2022-09-16 17:23 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-09-16 17:23 pgsql: Improve plpgsql's ability to handle arguments declared as RECORD Tom Lane <tgl@sss.pgh.pa.us> 2022-09-16 17:23 pgsql: Improve plpgsql's ability to handle arguments declared as RECORD Tom Lane <tgl@sss.pgh.pa.us> 2022-09-16 17:23 pgsql: Improve plpgsql's ability to handle arguments declared as RECORD Tom Lane <tgl@sss.pgh.pa.us> 2022-09-16 17:23 pgsql: Improve plpgsql's ability to handle arguments declared as RECORD Tom Lane <tgl@sss.pgh.pa.us> 2022-09-16 17:23 pgsql: Improve plpgsql's ability to handle arguments declared as RECORD Tom Lane <tgl@sss.pgh.pa.us> 2022-09-16 17:23 pgsql: Improve plpgsql's ability to handle arguments declared as RECORD Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox