Re: Does Type Have = Operator?
От | Tom Lane |
---|---|
Тема | Re: Does Type Have = Operator? |
Дата | |
Msg-id | 27888.1462929257@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Does Type Have = Operator? ("David E. Wheeler" <david@justatheory.com>) |
Ответы |
Re: Does Type Have = Operator?
|
Список | pgsql-hackers |
"David E. Wheeler" <david@justatheory.com> writes: > pgTAP has a function that compares two values of a given type, which it uses for comparing column defaults. It looks likethis: > CREATE OR REPLACE FUNCTION _def_is( TEXT, TEXT, anyelement, TEXT ) > RETURNS TEXT AS $$ Given that you're coercing both one input value and the result to text, I don't understand why you don't just compare the text representations. I'm also not very clear on what you mean by "comparing column defaults". A column default is an expression (in the general case anyway), not just a value of the type. Maybe if you'd shown us the is() function, as well as a typical usage of _def_is(), this would be less opaque. regards, tom lane
В списке pgsql-hackers по дате отправления: