Andrew Dunstan <[EMAIL PROTECTED]> writes: > There will only be an issue if you use table/type names beginning with > underscore, right? And I don't think it will matter because nobody has > been relying on that to date as we haven't had array types for those. We > should probably document that relying on the array name is both fragile > and unnecessary.
I added this to the CREATE TYPE reference page, which AFAIR is the only place that mentions the naming convention at all: <para> Before <productname>PostgreSQL</productname> version 8.3, the name of a generated array type was always exactly the element type's name with one underscore character (<literal>_</literal>) prepended. (Type names were therefore restricted in length to one less character than other names.) While this is still usually the case, the array type name may vary from this in case of maximum-length names or collisions with user type names that begin with underscore. Writing code that depends on this convention is therefore deprecated. Instead, use <structname>pg_type</>.<structfield>typarray</> to locate the array type associated with a given type. </para> <para> It may be advisable to avoid using type and table names that begin with underscore. While the server will change generated array type names to avoid collisions with user-given names, there is still risk of confusion, particularly with old client software that may assume that type names beginning with underscores always represent arrays. </para> regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster