Re: Postgresql -- initial impressions and comments

Поиск
Список
Период
Сортировка
От Magnus Naeslund(f)
Тема Re: Postgresql -- initial impressions and comments
Дата
Msg-id 109101c29b07$d7e635a0$f80c0a0a@mnd
обсуждение исходный текст
Ответ на Postgresql -- initial impressions and comments  ("j.random.programmer" <javadesigner@yahoo.com>)
Список pgsql-general
j.random.programmer <javadesigner@yahoo.com> wrote:
> Hi:
>
> I am a long time MySQL/Innodb user. I just installed
> postgres 7.3 on my linux box and thought I'd post
> some comments:
>
> 1)
> Running postgres as non-root is understandable but
> should not be _mandated_ (for totally private
> networks,
> it's overkill). Trust the user...
>

Why run as root?
It's as simple to run as postgres user, and by doing it this way we
catch any security holes as an non root.
It's best to be consistant in my meaning, as it makes you NEVER install
an root hole.
It's also easier to limit resources on an userlevel (quotas, rlimits).

[snip]

>
> 3) The documentation needs to be radically improved.
> The mysql docs are much more comprehensive.

[snip]
What topics are the documentation bad?
I find it very good and on-topic.
I usually find everything i need in the Reference Guide, if not it's in
the Users Guide.

>
> 4) The auto-increment ("serial") fields are very
> badly documented.
>

http://www.se.postgresql.org/users-lounge/docs/7.3/postgres/datatype.htm
l#DATATYPE-SERIAL
Doesn't this tell you what you need to know?

> Normally, I want to say something like:
>
>   INSERT into foo values (null, 'a', 'b',...)
>
> where the first field is defined as serial. However
> I can't send null to that field and expect it to be
> auto incremented - I have to either list out my
> fields in the statment (and omit the serial field):
>
>   INSERT into foo
>    (field_a, field_b,...) values  ('a', 'b', ...)
>
[snip]

Well it's a bad style to use the first syntax.
It doesn't work if the column order changes (database dump/restore,
column drop/add).
It will also break you app if there's a new column added, it wouldn't if
you use the second syntax.

[snip]

> 6) Well, docs again: there are no examples or
> techniques for importing/exporting comma or tab
> delimited files from/to tables ? Is this possible but
> I just didn't find it ?
>

Exporting:
try "man pg_dump".
Also read the documentation:
http://www.se.postgresql.org/users-lounge/docs/7.3/postgres/backup.html

Importing:
http://www.se.postgresql.org/users-lounge/docs/7.3/postgres/sql-copy.htm
l

> Well, having played with postgres for the first time,
> these were the initial (after 4-5 hours) points that
> came up. But overall, it looks and feels like a solid
> product. The hot dump is a nice feature - I can
> dump the db without shutting it down - innodb in
> contrast charges $$ for this feature.
>
> Best regards,
>
> javadesigner@yahoo.com
>

Nice that you like it ;)
It looks only that you now need to learn the documentation layout :)

Magnus



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Segmentation fault while COPY in 7.3
Следующее
От: Riyaz@umapinc.com
Дата:
Сообщение: Get list of tables in a database