Re: [GENERAL] Empty arrays with ARRAY[]

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Empty arrays with ARRAY[]
Дата
Msg-id 2922.1196111058@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] Empty arrays with ARRAY[]  ("Brendan Jurd" <direvus@gmail.com>)
Ответы Re: [GENERAL] Empty arrays with ARRAY[]  ("Brendan Jurd" <direvus@gmail.com>)
Список pgsql-hackers
"Brendan Jurd" <direvus@gmail.com> writes:
> This approach is making sense to me, but I've run into a bit of a
> dependency issue.  A_Const does indeed have a slot for typecasts by
> way of a TypeName member.  A_Const and TypeName are both defined in
> parsenodes.h, whereas ArrayExpr is defined in primnodes.h.  So
> unfortunately I can't just add a TypeName member to ArrayExpr.

That would be quite the wrong thing to do anyway, since ArrayExpr is
a run-time representation and shouldn't have any such thing attached
to it.  What you probably need is a separate parse-time representation
of ARRAY[], a la the difference between A_Const and Const.

Another possibility is to just hack up a private communication path
between transformExpr and transformArrayExpr, ie when you see TypeCast
check to see if its argument is ArrayExpr and do something different.
This would be a mite klugy but it'd be a much smaller patch that way.
        regards, tom lane


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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: Locating sharedir in PostgreSQL on Windows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Locating sharedir in PostgreSQL on Windows