Re: Postgres Pain Points 2 ruby / node language drivers

Поиск
Список
Период
Сортировка
От Chris Travers
Тема Re: Postgres Pain Points 2 ruby / node language drivers
Дата
Msg-id CAKt_Zfuou9Vn7SgAiAX2YNxPDdaqDFEWeQSz2XAxuALd2pbZVA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Postgres Pain Points 2 ruby / node language drivers  ("Karsten Hilbert" <Karsten.Hilbert@gmx.net>)
Ответы Re: Postgres Pain Points 2 ruby / node language drivers  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Список pgsql-general


On Fri, Aug 12, 2016 at 11:32 AM, Karsten Hilbert <Karsten.Hilbert@gmx.net> wrote:
På fredag 12. august 2016 kl. 10:33:19, skrev Chris Travers <chris.travers@gmail.com[chris.travers@gmail.com]>:
 
> My preference is stored procedures plus service locators

I know your work on the former with respect to the financial app you are working on.
Would you care to elaborate a little on the latter (service locators) ?

Sure.  What I prefer to do is to allow for a (cacheable) lookup on the basis of some criteria, either:
1.  Function name or
2.  Function name and first argument type

This assumes that whichever discovery criteria you are using leads to uniquely identifying a function.

Then from the argument list, I know the names and types of the arguments, and the service locator can map them in.  This means:

1.  You can expose an API which calls arguments by name rather than just position, and
2.  You can add arguments of different types without breaking things as long as it is agreed that unknown arguments are passed in as NULL.

In Oracle, of course, one has revision based editions, which allow similar seamless migration, but in both cases you can slowly extend an API around your data in a way that applications can use without having to upgrade all applications using the db at the same time
 

Thanks,
Karsten


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



--
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor lock-in.

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

Предыдущее
От: Chris Travers
Дата:
Сообщение: Re: Postgres Pain Points 2 ruby / node language drivers
Следующее
От: Ioana Danes
Дата:
Сообщение: Re: Corrupted Data ?