Re: Use array in a dynamic statement

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Use array in a dynamic statement
Дата
Msg-id 603c8f070903051851h261abba9s1729f6773c85e3d1@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Use array in a dynamic statement  (Sophie Yang <yangsophie@yahoo.com>)
Список pgsql-hackers
On Thu, Mar 5, 2009 at 8:32 PM, Sophie Yang <yangsophie@yahoo.com> wrote:
>
> I was wondering why USING clause is not supported in pl/pgsql dynamic statement. Serialization is the option I tried
toavoid, but it seems there is no better approach available. 
>
> Just to say a few more about the usage of my function. In dag_tree_1, (rid, rtid) is the primary key, which
identifiesa node in a tree structure. The idx field is a kind of dewy index. for example: 
> rid       rtid     idx
> 1123   1       0000.0006.0033
> 3231   1       0000.0006
> 786     6       0000.0007.8853
> 80923  2       0000.0007.8853.2382
>
> The function takes in a list of rid and rtid pair (nids), sort them by the length of the dewy index, which is
equivalentto sort the nodes by their tree depth. That's what I try to achieve. Maybe someone has different idea to
implementthe function? 

Well the function is pretty simple.  Maybe you could merge the logic
encapsulated by the function into the containing query?

...Robert


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: GIN, partial matches, lossy bitmaps
Следующее
От: Robert Lor
Дата:
Сообщение: Additional DTrace Probes