Re: Table and Field namestyle best practices?

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: Table and Field namestyle best practices?
Дата
Msg-id 441455.61029.qm@web31812.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Table and Field namestyle best practices?  (novnov <novnovice@gmail.com>)
Ответы Re: Table and Field namestyle best practices?
Список pgsql-general
> I've been using namestyles with mixed case like OrgID. That is much more
> readable than orgid. Probably a good convention to adopt would be to use
> namestyles like org_id. That change I can live with.

According to recommended practice you have a choice to make. Here is what
is described from the following link:
http://www.postgresql.org/docs/8.1/interactive/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS

Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to
lower case. For example, the identifiers FOO, foo, and "foo" are considered the same by
PostgreSQL, but "Foo" and "FOO" are different from these three and each other. (The folding of
unquoted names to lower case in PostgreSQL is incompatible with the SQL standard, which says that
unquoted names should be folded to upper case. Thus, foo should be equivalent to "FOO" not "foo"
according to the standard. If you want to write portable applications you are advised to always
quote a particular name or never quote it.)

Make note of the last sentence.

Regards,

Richard Broersma Jr.

В списке pgsql-general по дате отправления:

Предыдущее
От: novnov
Дата:
Сообщение: Table and Field namestyle best practices?
Следующее
От: novnov
Дата:
Сообщение: Re: Table and Field namestyle best practices?