Search Postgresql Archives

Dynamic collation support

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

 



For database functions, is there any way to manage collations besides
dynamic sql?  It doesn't look like there is but I thought I'd ask.

For example, I want to do something like:

DO
$$
DECLARE
  c name DEFAULT 'en_GB';
BEGIN
  SELECT * FROM foo ORDER BY a COLLATE c;
END;
$$;

and not

DO
$$
DECLARE
  c name DEFAULT 'en_GB';
BEGIN
  EXECUTE 'SELECT * FROM foo ORDER BY a COLLATE ' || quote_ident(c);
END;
$$;

I understand this would disable all index supported sorting; that's ok.

Not being able to specify collation in a parameterized manner presents
some issues...I'm curious if there are workarounds.

merlin


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[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