Re: inserting user defined types through a rule?
От | Tom Lane |
---|---|
Тема | Re: inserting user defined types through a rule? |
Дата | |
Msg-id | 20105.1017716317@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | inserting user defined types through a rule? (Bear Giles <bgiles@coyotesong.com>) |
Ответы |
Re: inserting user defined types through a rule?
|
Список | pgsql-hackers |
Bear Giles <bgiles@coyotesong.com> writes: > I recently discovered a problem inserting a user-defined type when > going through a rule. ... > The problem is that I can insert literal text: > create table t ( cert x509 ); > insert into t values ('---- BEGIN CERTIFICATE ---- ....'); > but when I try the same with cert_insert it's clear that "new.cert" > isn't getting initialized properly. (It works fine when the cert is > already in the database.) Trying to explicitly cast the literal to > as part of the query doesn't help - it seems that the rule just rewrites > the query and the cast is getting lost. This seems like a bug, but I don't have much hope of being able to find it without a test case to step through. Could you boil things down to a reproducible test case? FWIW, it seems unlikely that the issue is your user-defined type per se; the rule rewriter mechanisms are quite type-ignorant. You may be able to develop a test case that doesn't use your own type at all. > Any ideas? Is this something addressed in 7.2? Can't tell at this point. What version are you using, anyway? regards, tom lane
В списке pgsql-hackers по дате отправления: