Re: Composite Type : pros and cons

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Composite Type : pros and cons
Дата
Msg-id CAHyXU0zSC=YONtvM7e1LuT=UEs+FKW33p5RMS22B-7dx8Oz+tw@mail.gmail.com
обсуждение исходный текст
Ответ на Composite Type : pros and cons  (Leguevaques Alex <alex.leguevaques@wanadoo.fr>)
Список pgsql-general
On Thu, Jan 26, 2012 at 3:22 AM, Leguevaques Alex
<alex.leguevaques@wanadoo.fr> wrote:
>
> Hello,
> I'm new to Pg and exploring its advanced functionalities for a project.
> I find composite type very interesting, but what are problems/limitations ?
> I'd want to create this structure for example:

Composite types add a little value in that you can apply frequently
grouped together fields in a table.  This can save a little typing.
The downside is you are diverging from classic sql mechanics a little
bit which can make some things awkward.

Where they really shine though is as variables if you are doing a lot
of backend programming with functions.  You can pass them too and from
functions and make arrays out of them...this is very powerful once you
get the hang of it.

If you are using a client stack that understands postgres composite
types, you can (ab)use this to send complicated datasets to and from
the database.

merlin

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

Предыдущее
От: salah jubeh
Дата:
Сообщение: Re: How to push predicate down
Следующее
От: David W Noon
Дата:
Сообщение: Re: Let-bindings in SQL statements