Search Postgresql Archives

Re: Confused by result of pg_catalog.format_type()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Erik Jones <erik@xxxxxxxxxx> writes:
> Ah, pg_catalog.format_type(prorettype, null) = '"trigger"', thanks.

It's probably fair to ask what it is you want to accomplish here,
because comparing format_type's output to a constant seems awfully
fragile.  Aside from the quotes (which I believe 8.3 won't emit in
this particular case) the output can vary depending on search_path
and perhaps other factors.

If you're trying to identify trigger functions I'd suggest

	where prorettype = 'pg_catalog.trigger'::pg_catalog.regtype

as being the most bulletproof formulation, and probably faster too.

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux