Thread: one ask

one ask

From
Partyka Robert
Date:
any can explain me why I get every error and notice errors twice ?


<--cut-->

n=# create table (
n(# );
ERROR:  parser: parse error at or near "("
ERROR:  parser: parse error at or near "("
n=# create table a (
n(# index int4 not null,
n(# a char(20) not null,
n(# unique (index),
n(# primary key (index)
n(# );
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'a_pkey' for
table
'a'
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'a_pkey' for
table
'a'
CREATE
nasz_system=# select version();
                            version
---------------------------------------------------------------
 PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc 2.95.3
(1 row)



regards

BoBsoN


Re: one ask

From
Tom Lane
Date:
Partyka Robert <bobson@saturn.alpha.pl> writes:
> any can explain me why I get every error and notice errors twice ?

How did you start the postmaster?

It looks like you might have the postmaster's stderr pointed at your
terminal, which would mean that its attempts to write to a logfile
will end up on your screen --- along with the message sent back to
the client and printed by psql.

You should redirect the postmaster's stdout and stderr to someplace,
either a logfile or /dev/null.  See the Administrator's Guide section
about how to start the postmaster.

            regards, tom lane

Re: one ask

From
Partyka Robert
Date:
> > any can explain me why I get every error and notice errors twice ?
>
> How did you start the postmaster?
>
> It looks like you might have the postmaster's stderr pointed at your
> terminal, which would mean that its attempts to write to a logfile
> will end up on your screen --- along with the message sent back to
> the client and printed by psql.

You right. I start postmaster like:

$ su - postgres
$ ../bin/pg_ctl -D /usr/local/pgsql/files start

and start psql on the same shell. So every errors and notices loops back
to me on screen ;) My mistake ;)

Thanks.

BoBsoN