Re: patch: plpgsql - access records with rec.(expr)
От | Neil Conway |
---|---|
Тема | Re: patch: plpgsql - access records with rec.(expr) |
Дата | |
Msg-id | 1101168433.12361.17.camel@localhost.localdomain обсуждение исходный текст |
Ответ на | Re: patch: plpgsql - access records with rec.(expr) (Matt <matt@kynx.org>) |
Ответы |
Re: patch: plpgsql - access records with rec.(expr)
|
Список | pgsql-hackers |
On Mon, 2004-11-22 at 10:06 +0000, Matt wrote: > This would execute a string and pass back the result? It would evaluate a string as a PL/PgSQL statement (which means you could construct any PL/PgSQL statement dynamically, including access to fields of a RECORD determined at runtime). > > I don't like this: it implicitly coerces a string literal into an > > identifier (i.e. a column name). Treating data as code can be useful, > > but I think we need to make it more obvious to the user. I think a > > proper EVALUATE statement might be a better solution. > > See your point. But what about NEW.($1)? I don't follow -- what do you mean? (BTW, I think my comment also applies to variables of type "text" and similar -- I think the patch would be a lot simpler if you just implement access to record fields by ordinal position, and don't implement access by field name.) -Neil
В списке pgsql-hackers по дате отправления: