Re: [PATCHES] fix log_min_duration_statement logic error

2003-10-06 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes:
 Agreed.  elog is the proper place, because then you guarantee that it is
 all on one line.  Is that OK?  Do we have elogs that we want over
 several lines?  Is this something we can do at this stage in beta?

As to the latter: sure.  We've already hacked the formatting of the log
output quite a bit since 7.3.  Better to hit them with this too now,
than spread the pain over multiple releases.

As to the former: the only thing that seems debatable to me is what to
do about the layout of the new multi-part ereport() messages.  I would
be inclined to go for one line per part, viz
ERROR: blah blah blah
DETAIL: blah blah\nblah blah
HINT: blah blah\nblah blah\nblah blah
but perhaps someone would like to argue for somehow collapsing all this
to one line?  If so, how exactly?

regards, tom lane

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


Re: [PATCHES] spanish translation updates

2003-10-06 Thread Peter Eisentraut
Alvaro Herrera writes:

 Attached are pg_controldata, pgscripts and libpq spanish translations.

Installed.

-- 
Peter Eisentraut   [EMAIL PROTECTED]


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


Re: [PATCHES] fix log_min_duration_statement logic error

2003-10-06 Thread Bruce Momjian
Tom Lane wrote:
 Bruce Momjian [EMAIL PROTECTED] writes:
  Agreed.  elog is the proper place, because then you guarantee that it is
  all on one line.  Is that OK?  Do we have elogs that we want over
  several lines?  Is this something we can do at this stage in beta?
 
 As to the latter: sure.  We've already hacked the formatting of the log
 output quite a bit since 7.3.  Better to hit them with this too now,
 than spread the pain over multiple releases.
 
 As to the former: the only thing that seems debatable to me is what to
 do about the layout of the new multi-part ereport() messages.  I would
 be inclined to go for one line per part, viz
   ERROR: blah blah blah
   DETAIL: blah blah\nblah blah
   HINT: blah blah\nblah blah\nblah blah
 but perhaps someone would like to argue for somehow collapsing all this
 to one line?  If so, how exactly?

Are those lines sent to the elog as one write() or separate ones --- do
they always appear together in the log?

I had a new idea on output format.  Instead of converting newline to
\n, and double-escaping backslashes, we add a tab after any newline,
so the output looks like:

LOG:  duration: 4.035 ms  query: select *
from pg_language;

This makes the logs look better, and it is easier for script to grab
queries.  Grep doesn't work as well, but I think that is OK.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [PATCHES] fix log_min_duration_statement logic error

2003-10-06 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes:
 Are those lines sent to the elog as one write() or separate ones --- do
 they always appear together in the log?

Currently they are sent in a single fprintf(stderr), which might or
might not be good enough to ensure atomicity.  We could hack this
to a direct write() if you don't mind depending on fileno(stderr),
but I think that'd create some portability issues on non-Unix
platforms.

If you're using syslog then I think all bets are off anyway.

 I had a new idea on output format.  Instead of converting newline to
 \n, and double-escaping backslashes, we add a tab after any newline,

That's a thought... seems less invasive than the backslashing.  Not sure
how well it'll work for syslog output though.

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [PATCHES] fix log_min_duration_statement logic error

2003-10-06 Thread Alvaro Herrera Munoz
On Mon, Oct 06, 2003 at 10:42:57AM -0400, Tom Lane wrote:
 Bruce Momjian [EMAIL PROTECTED] writes:

  I had a new idea on output format.  Instead of converting newline to
  \n, and double-escaping backslashes, we add a tab after any newline,
 
 That's a thought... seems less invasive than the backslashing.  Not sure
 how well it'll work for syslog output though.

Not good.  Some syslogs will replace the literal tab with a ^I.
Maybe it should be a bunch of spaces when using syslog.
It seems a good idea to me anyway.

How would it handle multiple fields?  Say
LOG: blah blah
DETAIL: something
HINT: something else

Will it be
LOG: blah blah
DETAIL: something else
HINT: something else
?

-- 
Alvaro Herrera ([EMAIL PROTECTED])
Find a bug in a program, and fix it, and the program will work today.
Show the program how to find and fix a bug, and the program
will work forever (Oliver Silfridge)

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


Re: [PATCHES] fix log_min_duration_statement logic error

2003-10-06 Thread Tom Lane
Alvaro Herrera Munoz [EMAIL PROTECTED] writes:
 Bruce Momjian [EMAIL PROTECTED] writes:
 I had a new idea on output format.  Instead of converting newline to
 \n, and double-escaping backslashes, we add a tab after any newline,

 Not good.  Some syslogs will replace the literal tab with a ^I.

That seems okay.  We just want to make sure continuation lines are
easily distinguishable.  (But leading spaces would be okay with me too.)

 How would it handle multiple fields?  Say
 LOG: blah blah
 DETAIL: something
 HINT: something else

 Will it be
 LOG: blah blah
 DETAIL: something else
 HINT: something else

No, one would hope no tab before DETAIL/HINT/etc.  The idea is to be
able to recognize when the contents of one of these entries spans lines.

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[PATCHES] brazilian portuguese translations

2003-10-06 Thread Euler Taveira de Oliveira
Peter,

The file contains updated translations for libpq, pg_dump, pg_controldata and 
pg_resetxlog and new ones pgscripts and psql.

I put the files in my machine because I don't know if the list accept attachs of 41kb.

http://www.ufgnet.ufg.br/euler/pgsql-pt_BR.tar.gz
Please apply.

[EMAIL PROTECTED]:~/pgsql/traducoes/versao_0_4$ msgfmt -c -v libpq-pt_BR.po 
100 translated messages.
[EMAIL PROTECTED]:~/pgsql/traducoes/versao_0_4$ msgfmt -c -v pg_controldata-pt_BR.po 
39 translated messages.
[EMAIL PROTECTED]:~/pgsql/traducoes/versao_0_4$ msgfmt -c -v pg_dump-pt_BR.po   
391 translated messages.
[EMAIL PROTECTED]:~/pgsql/traducoes/versao_0_4$ msgfmt -c -v pg_resetxlog-pt_BR.po 
57 translated messages.
[EMAIL PROTECTED]:~/pgsql/traducoes/versao_0_4$ msgfmt -c -v pgscripts-pt_BR.po
112 translated messages.
[EMAIL PROTECTED]:~/pgsql/traducoes/versao_0_4$ msgfmt -c -v psql-pt_BR.po  
453 translated messages.

-- 
Euler Taveira de Oliveira
euler (at) ufgnet.ufg.br
Desenvolvedor Web e Administrador de Sistemas
UFGNet - Universidade Federal de Goiás

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [PATCHES] fix log_min_duration_statement logic error

2003-10-06 Thread Bruce Momjian
Tom Lane wrote:
 Alvaro Herrera Munoz [EMAIL PROTECTED] writes:
  Bruce Momjian [EMAIL PROTECTED] writes:
  I had a new idea on output format.  Instead of converting newline to
  \n, and double-escaping backslashes, we add a tab after any newline,
 
  Not good.  Some syslogs will replace the literal tab with a ^I.
 
 That seems okay.  We just want to make sure continuation lines are
 easily distinguishable.  (But leading spaces would be okay with me too.)

Agreed.  It is easy to strip off the tab to rebuild the original query
--- striping off 8 spaces seems less logical.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

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


[PATCHES] psql italian translation

2003-10-06 Thread Fabrizio Mazzoni
Resending because i did not attahc the file .. !! Sorry for the mistake...

Hello, 

I just translated the psql.pot file into Italian language and tested it in 7.4beta3. 
It seems to work just fine. The it language is not in the nls.mk so it must be 
added. I don't know if there is some problem but some messages are not translated in 
psql. The thing is that these messages are not present in the .pot file ..
Anyway if you want to check you must check the SQL help for the DROP command and you 
will see it for yourself.

Best Regards,

Fabrizio Mazzoni
Macron Srl
http://eteampoint.com



psql.pot.gz
Description: Binary data

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [PATCHES] psql italian translation

2003-10-06 Thread Peter Eisentraut
Fabrizio Mazzoni writes:

 I just translated the psql.pot file into Italian language and tested it in 7.4beta3.

Installed.  But please check out psql --help and \? within psql and line
up the strings correctly.

 I don't know if there is some problem but some messages are not
 translated in psql. The thing is that these messages are not present in
 the .pot file .. Anyway if you want to check you must check the SQL help
 for the DROP command and you will see it for yourself.

Works here:

peter=# \help DROP TABLE
Comando: DROP TABLE
Descrizione: elimina una tabella
Sinstassi:
DROP TABLE nome [, ...] [ CASCADE | RESTRICT ]

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [PATCHES] psql italian translation

2003-10-06 Thread Gaetano Mendola
Peter Eisentraut wrote:

Fabrizio Mazzoni writes:


I just translated the psql.pot file into Italian language and tested it in 7.4beta3.


Installed.  But please check out psql --help and \? within psql and line
up the strings correctly.

I don't know if there is some problem but some messages are not
translated in psql. The thing is that these messages are not present in
the .pot file .. Anyway if you want to check you must check the SQL help
for the DROP command and you will see it for yourself.


Works here:

peter=# \help DROP TABLE
Comando: DROP TABLE
Descrizione: elimina una tabella
Sinstassi:
DROP TABLE nome [, ...] [ CASCADE | RESTRICT ]
Please see my post ( I choose the wron address) on hackers, there are 
some typos on the traslation.

Regards
Gaetano Mendola




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