"David E. Wheeler" <[email protected]> writes:
> pgTAP has a function that compares two values of a given type, which it uses
> for comparing column defaults. It looks like this:
> 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
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers