Re: nOOB Question..

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: nOOB Question..
Дата
Msg-id 200305301800.36037.josh@agliodbs.com
обсуждение исходный текст
Ответ на nOOB Question..  (Herbie <herbie@faams.net>)
Ответы Re: nOOB Question..  (Dani Oderbolz <oderbolz@ecologic.de>)
Список pgsql-novice
Herbie,

> I've been using PosgreSQL for less than one week. Got it installed and it
> appears to be running.

Congratulations.

> Before really screwing things up, I like to at least read the docs at least
> once.

<grin>
BTW, there are also several good PostgreSQL books on the market which are more
accessable than the online docs.

> Being a business/accounting type developer, I noticed that we have access
> to array type columns.
>
> In the example I found:
>
>   CREATE TABLE foo (
>       barr                 text,
>       doo_daa       numeric(7,2)[]
>
> );
>
> Is this the correct syntax for create a the row doo_daa as a numeric array?

I believe so, yes.

> If this is correct, what is the limit on the number of the extents of the
> array?

There isn't one.  You can provide one (NUMERIC(7,2)[5]) but it will not be
enforced.   Joe Conway is overhauling array handling for 7.4; I don't know if
array limits will be enforcable in the future.

FWIW, I primarily develop business/accounting applications, and have to say
that arrays as a data type have no place in business/financial applications
in permanent tables.  I have yet to see a case in such an application where a
child table was not more appropriate than an array.  Arrays are very useful
for functions, caching, and temporary tables for "flattened" relational data,
but should be avoided for real data tables.

(Please note that this does not apply to scientific, mathematical, or
geographic databases, which have *lots* of reasons to use arrays)


--
Josh Berkus
Aglio Database Solutions
San Francisco

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

Предыдущее
От: Peter Bierman
Дата:
Сообщение: why doesn't an index help my simple query?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: why doesn't an index help my simple query?