Re: Automatically parsing in-line composite types

Поиск
Список
Период
Сортировка
От Mitar
Тема Re: Automatically parsing in-line composite types
Дата
Msg-id CAKLmikO=yB5hGGvB6AdyQpzFH9h9L=2=1MoDshAUpEZ=TnqhiA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Automatically parsing in-line composite types  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
Hi!

On Wed, Oct 30, 2019 at 3:06 PM Merlin Moncure <mmoncure@gmail.com> wrote:
> It looks it up from the database.

Yes, this is how I started doing it in my prototype as well.

> Correct. Only declared (via CREATE TYPE) composite types will work due
> to protocol limitations.

Exactly. This is where I got stuck, so this is why I started this thread. :-(

> So if you decided to scratch in itch and create a postgres
> BSON type, no one would likely use it, since the chances of adoption
> in core are slim to none.

Yea. :-( So we get back to square one. :-(

One other approach I was investigating was developing a Babel-like
transpiler for PostgreSQL SQL, so that I could have plugins which
would convert SQL queries to automatically encode values in JSON. And
then parse it back out once results arrive. Because yes, as you note,
JSON is the only stable and supported format among all installations
there is (except for the wire format, which has limitations). So
having to map to it and back, but without developer having to think
about it, might be the best solution.


Mitar

-- 
http://mitar.tnode.com/
https://twitter.com/mitar_m



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

Предыдущее
От: Kevin Brannen
Дата:
Сообщение: RE: Upgrade procedure
Следующее
От: M Tarkeshwar Rao
Дата:
Сообщение: RE: Getting following error in using cursor to fetch the records froma large table in c language