<...snip...> > > I'd try a functional index first. If that didn't do the job, I'd use a > trigger-maintained column _purely_ as an optimisation (ie I could drop > it and lose no data) that stored text representations of the data. > Honestly, though, I expect the functional index would be more than good > enough and probably wouldn't have much of an INSERT/UPDATE cost. <.../snip...>
I made a test table and tried a functional index (coalescing the two columns). Works! Now let me try that on a mirror on my full real table with millions of rows and report back. Sounds like a cleaner design so I may be on to something! Hope this helps the original poster with some ideas too. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general