Re: Re: proposal: ignore null fields in not relation type composite type based constructors

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Re: proposal: ignore null fields in not relation type composite type based constructors
Дата
Msg-id CAFj8pRCzfTGXa9CZizVEaDWKpnYoUgEzTC9NhhALUMo6Mx_B3A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Re: proposal: ignore null fields in not relation type composite type based constructors  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Ответы Re: Re: proposal: ignore null fields in not relation type composite type based constructors  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Список pgsql-hackers
Hi


2014-09-03 9:27 GMT+02:00 Jeevan Chalke <jeevan.chalke@enterprisedb.com>:
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?



done

Regards

Pavel
 

Thanks

--
Jeevan B Chalke
Principal Software Engineer, Product Development
EnterpriseDB Corporation
The Enterprise PostgreSQL Company


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [Fwd: Re: proposal: new long psql parameter --on-error-stop]
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: PL/pgSQL 2