Re: Dyamic updates of NEW with pl/pgsql
От | Pavel Stehule |
---|---|
Тема | Re: Dyamic updates of NEW with pl/pgsql |
Дата | |
Msg-id | 162867791003130858w67f2c244ob0f1c27e9b3418f8@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Dyamic updates of NEW with pl/pgsql (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
2010/3/13 Tom Lane <tgl@sss.pgh.pa.us>: > Andrew Dunstan <andrew@dunslane.net> writes: >> I think we need some operator on records+strings for this functionality. > > I don't see how you're going to do that without utterly compromising the > type system. > > It's not so horrid to do this type of thing in plperl, pltcl etc because > you've already bought into an "everything is text" worldview when you > use those languages. But plpgsql is strongly typed just like SQL is, > and I don't think we should undo that. > strong typing isn't problem for field updating - and we can do necessary conversion to target type - for simple expression (without cached plan). I like some var = record[expression]; record[expression] = var; I don't thing so current static naturel of plpgsql is impossible problem. It needs just more inteligent assign statement. Pavel > (This will also be my main objection to letting hstore into core. > It has not solved the problem of handling real datatypes.) > > regards, tom lane >
В списке pgsql-hackers по дате отправления: