On 10/28/2011 06:49 PM, Robert Buckley wrote:
according to this article http://www.informit.com/articles/article.aspx?p=409471, the naming of tables, and fields is restricted to 63 characters and must start with an underscore or letter. Nothing is however said about in which character set. Am I allowed to name a table field < Änderung_1 >. The Ä is a german letter contained within the UTF8 character set.
It'll work, but sadly you will at some point run into badly written tools that mangle anything but 7-bit-ascii text.
psql on the Windows command line needs some extra love to behave correctly; you may have to issue a chcp command to change the console to unicode before starting psql if you're working with data that cannot be represented in the charset your version of Windows uses. That won't be an issue for umlauts etc, but if you wanted (say) hebrew table names on a German windows you'd probably have to change the codepage.
Other than that, PostgreSQL and its tools should be fine. You are likely to run into badly written tools elsewhere that mangle anything that isn't 7-bit ascii, though, so be careful.
In general, if PostgreSQL doesn't like a table identifier you can "double quote" it to get it to accept it. Table identifiers in double-quotes also have their case preserved rather than automatically being lower-cased like unquoted identifiers. Because the downcasing rules for anything except 7-bit ascii are less than clear, I'd recommend double-quoting all identifiers that use characters outside that range.
-- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general