Re: Transform for pl/perl
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Anthony Bykov <a.bykov@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2017-12-01T18:49:21Z
Lists: pgsql-hackers
A few very minor comments while quickly paging through:
1. non-ASCII tests are going to cause problems in one platform or
another. Please don't include that one.
2. error messages
a) please use ereport() not elog()
b) conform to style guidelines: errmsg() start with lowercase, others
are complete phrases (start with uppercase, end with period)
c) replace
"The type you was trying to transform can't be represented in JSONB"
maybe with
errmsg("could not transform to type \"%s\"", "jsonb"),
errdetail("The type you are trying to transform can't be represented in JSON")
d) same errmsg() for the other error; figure out suitable errdetail.
3. whitespace: don't add newlines to while, DirectFunctionCallN, pnstrdup.
4. the "relocatability" test seems pointless to me.
5. "#undef _" looks bogus. Don't do it.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Fix jsonb_plperl to convert Perl UV values correctly.
- 93b6e03ab479 11.0 landed
-
Fix contrib/hstore_plperl to look through scalar refs.
- e3b7f7cc5063 11.0 landed
- 7594b7a53366 10.5 landed
- 645929c545ef 9.5.14 landed
- 1bebfb9b6365 9.6.10 landed
-
Allow plperl_sv_to_datum to look through scalar refs.
- 3a382983d142 11.0 landed
-
Fix excessive enreferencing in jsonb-to-plperl transform.
- 1731e3741cbb 11.0 landed