Speaking on behalf of the GNUmed schema.

The type of thing comes first for consistency.

primary key: pk

   Some might argue pk_<table_name> is preferrable such that
   in joins one ist not forced to use column aliases. We do
   in such cases. The "... where table.pk = ..." just seems
   soo intuitive.

foreign key: fk_<foreign_table_name>

   This then affords fk_<foreign_table_name>_<foreign_table_column>
   should that ever be needed (likely an indication of bad design).

indices: idx_<table>_<column>

sequences: so far we relied on PG giving us a name

constraints: named by what they *do*, such as ensure_..._consistency

functions: f_<purpose>

trigger functions: trf_<purpose>

trigger: tr_<purpose>

> And other naming conventions suggest using mixed/camel case 
> (quoted-identifiers)
We don't use mixed case as that would *require* quoting which is
liable to being forgotten.

Not much help, just our convention.

Karsten
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to