Hi Pavel, Here are few more comments on new implementation.
1. /* - * SQL function row_to_json(row) + * SQL function row_to_json(row record, pretty bool, ignore_nulls bool) */ In above comments, parameter name "row" should changed to "rowval". 2. -DATA(insert OID = 3155 ( row_to_json PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 114 "2249" _null_ _null_ _null_ _null_ row_to_json _null_ _null_ _null_ )); +DATA(insert OID = 3155 ( row_to_json PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 114 "2249 16 16" _null_ _null_ "{rowval,pretty,ignore_nulls}" _null_ row_to_json _null_ _null_ _null_ )); Number of arguments (pronargs) should be 3 now. However, when we create it again with default values it gets updated. But still here we should not have inconsistency. 3. extern Datum row_to_json(PG_FUNCTION_ARGS); extern Datum row_to_json_pretty(PG_FUNCTION_ARGS); +extern Datum row_to_json_pretty_choosy(PG_FUNCTION_ARGS); extern Datum to_json(PG_FUNCTION_ARGS); With this new implementation, we have NOT added row_to_json_pretty_choosy() function. So need to remove that added line. Also we have only one function with default arguments and thus removed row_to_json_pretty() function as well. Thus need to remove extern for that too. 4. Can we have couple of test cases with named argument along with skipped pretty parameter test? Thanks -- Jeevan B Chalke Principal Software Engineer, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company