Re: Proposal: json_populate_record and nested json objects

Поиск
Список
Период
Сортировка
От Chris Travers
Тема Re: Proposal: json_populate_record and nested json objects
Дата
Msg-id 1361412433.252897.1379339839458.open-xchange@email.1and1.co.uk
обсуждение исходный текст
Ответ на Re: Proposal: json_populate_record and nested json objects  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: Proposal: json_populate_record and nested json objects  (Merlin Moncure <mmoncure@gmail.com>)
Re: Proposal: json_populate_record and nested json objects  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
 

> On 16 September 2013 at 14:43 Merlin Moncure <mmoncure@gmail.com> wrote:

>
> Huge +1 on on this. Couple random thoughts:
>
> *) Hard to see how you would structure this as an extension as you're
> adjusting the behaviors of existing functions, unless you wanted to
> introduce new function names for testing purposes?
 
Yeah, and reading the source, it looks like some parts of the JSON parsing code will have to be rewritten because the nested object errors are thrown quite deeply in the parsing stage.  It looks to me as if this will require some significant copying as a POC into a new file with different publicly exposed function names.
>
> *) Would like to at least consider being able to use casting syntax as
> a replacement for "populate_record" and (the missing) "populate_array"
> for most usages.
 
Yes.  I am trying to figure out how best to do this at present.  Initially I think I would be happy to settle for casts wrapping functions which themselves just wrap the call to populate_record.
 
What I will probably do for my POC is expose the following methods:
 
1.  json_populate_type()
2.  json_populate_array()
 
Then we can talk about whether to merge the changes into the core,
 
This will be an interesting way to get into PostgreSQL hacking.
 
Best Wishes,
Chris Travers

>
> merlin
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
Best Wishes,
Chris Travers
http://www.2ndquadrant.com
PostgreSQL Services, Training, and Support

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

Предыдущее
От: Haribabu kommi
Дата:
Сообщение: Re: insert throw error when year field len > 4 for timestamptz datatype
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Freezing without write I/O