Re: [PATCHES] [GENERAL] Empty arrays with ARRAY[]
От | Tom Lane |
---|---|
Тема | Re: [PATCHES] [GENERAL] Empty arrays with ARRAY[] |
Дата | |
Msg-id | 13159.1206036191@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [GENERAL] Empty arrays with ARRAY[] ("Brendan Jurd" <direvus@gmail.com>) |
Список | pgsql-hackers |
"Brendan Jurd" <direvus@gmail.com> writes: > A quick recap: I submitted a patch for empty ARRAY[] syntax back in > November, and as far as I can see it never made it to the patches > list. Gregory suggested a different way of approaching the problem > (quoted below), but nobody commented further about how it might be > made to work. > I'd like to RFC again on Gregory's idea, and if that doesn't bear any > fruit I'd like to submit the patch as-is for review. Greg's idea is basically to invent array-of-UNKNOWN as a genuine datatype, which as I stated way back when seems fairly dangerous to me. UNKNOWN is already a pretty slippery animal, and I don't know what cast paths we might open up by doing that. I think the require-a-cast solution is a lot less likely to result in unforeseen side-effects. >> Whereas my patch requires you to write >> a text[]: =array[]::text[]; >> ... which seems pretty stupid. In practice you'd write DECLARE a text[] := '{}'; which is even shorter, so I don't find this convincing. regards, tom lane
В списке pgsql-hackers по дате отправления: