[PATCHES] Translation updates for 8.0: initdb-ru, pg_dump-ru, psql-ru

2004-08-25 Thread Serguei Mokhov
Hello,

I updated all the attached .po files back to 100% an also
tweaked some messages and fixed discovered typos in psql.
Please apply.

Thanks,

-s

 initdb-ru.po.gz;pg_dump-ru.po.gz;psql-ru.po.gz

initdb-ru.po.gz
Description: GNU Zip compressed data


pg_dump-ru.po.gz
Description: GNU Zip compressed data


psql-ru.po.gz
Description: GNU Zip compressed data

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


[PATCHES] add hint

2004-08-25 Thread James William Pye
small hint that probably helpful in most cases..
-- 
Regards,
James William Pye
Index: aclchk.c
===
RCS file: /projects/cvsroot/pgsql-server/src/backend/catalog/aclchk.c,v
retrieving revision 1.104
diff -u -r1.104 aclchk.c
--- aclchk.c	18 Jun 2004 06:13:19 -	1.104
+++ aclchk.c	25 Aug 2004 19:33:22 -
@@ -760,7 +760,8 @@
 		if (!pg_language_tuple-lanpltrusted)
 			ereport(ERROR,
 	(errcode(ERRCODE_WRONG_OBJECT_TYPE),
-	 errmsg(language \%s\ is not trusted, langname)));
+	 errmsg(language \%s\ is not trusted, langname),
+	 errhint(only superusers may use untrusted languages)));
 
 		/*
 		 * Note: for now, languages are treated as owned by the bootstrap


signature.asc
Description: This is a digitally signed message part


Re: [PATCHES] add hint

2004-08-25 Thread Tom Lane
James William Pye [EMAIL PROTECTED] writes:
 small hint that probably helpful in most cases..

It'd be even better if it followed the message style guidelines...

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])


[PATCHES] Contrib -- PostgreSQL shared variables

2004-08-25 Thread pgsql
This is a first pass on a simple shared memory variable system for
PostgreSQL. I would appriciate anyone interested in this functionality to
rip it apart.

It basically adds this functionality:

SetShared('name', value);
GetSharedInt('name');
SetSharedText('name);
RemovedShared('name');

I also added two extra functions that are sort of a kludge, but could be
very helpful.

AddSharedInt('name', value);
SubSharedInt('name', value);

These add or subtect the 'value' from the variable and return the result.

sharedvar.tgz
Description: application/unix-tar

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

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


Re: [PATCHES] [HACKERS] Contrib -- PostgreSQL shared variables

2004-08-25 Thread Rick Gigger
LockShared('name');
[EMAIL PROTECTED] wrote:
This is a first pass on a simple shared memory variable system for
PostgreSQL. I would appriciate anyone interested in this functionality to
rip it apart.
It basically adds this functionality:
SetShared('name', value);
GetSharedInt('name');
SetSharedText('name);
RemovedShared('name');
I also added two extra functions that are sort of a kludge, but could be
very helpful.
AddSharedInt('name', value);
SubSharedInt('name', value);
These add or subtect the 'value' from the variable and return the result.

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[PATCHES] log_line_prefix additions

2004-08-25 Thread Ed L.

This patch against 8.0.0beta1 source adds log_line_prefix options for 
millisecond timestamps (%m), remote host (%h), and remote port (%P).  The 
milliseconds are useful for QPS measurements, and the remote port is 
worthless to us as part of %r.


*** src/backend/utils/error/elog.c.orig	2004-08-25 12:37:26.0 -0600
--- src/backend/utils/error/elog.c	2004-08-25 15:05:34.0 -0600
***
*** 1347,1348 
--- 1347,1370 
  break;
+ 			case 'm':
+ {
+ 	time_t stamp_time;
+ 	char strfbuf[128];
+ 	struct timeval tv;
+ 	struct timezone tz = {0, 0};
+ 
+ 	gettimeofday(tv, tz);
+  	stamp_time = tv.tv_sec;
+ 
+ 	/* leave room for milliseconds... */
+ 	strftime(strfbuf, sizeof(strfbuf),
+ 		%Y-%m-%d %H:%M:%S %Z,
+ 		localtime(stamp_time));
+ 
+ 	/* 'paste' milliseconds into place... */
+  	sprintf(strfbuf+19, .%03d, 
+ 		(int)(tv.tv_usec/1000));
+ 
+ 	appendStringInfoString(buf, strfbuf);
+ }
+ break;
  			case 't':
***
*** 1394,1395 
--- 1416,1430 
  }
+ 			case 'h':
+ if (MyProcPort)
+ {
+ 	appendStringInfo(buf, %s, MyProcPort-remote_host);
+ }
+ break;
+ 			case 'P':
+ if (MyProcPort)
+ {
+ 	if (strlen(MyProcPort-remote_port)  0)
+ 		appendStringInfo(buf, %s,
+ 		 MyProcPort-remote_port);
+ }
  break;
*** ./doc/src/sgml/runtime.sgml.orig	2004-08-25 15:11:39.0 -0600
--- ./doc/src/sgml/runtime.sgml	2004-08-25 15:13:29.0 -0600
***
*** 2304,2305 
--- 2304,2315 
  	row
+ 	 entryliteral%h/literal/entry
+ 	 entryRemote Hostname or IP address/entry
+ 	 entryYes/entry
+ 	/row
+ 	row
+ 	 entryliteral%P/literal/entry
+ 	 entryRemote Port/entry
+ 	 entryYes/entry
+ 	/row
+ 	row
  	 entryliteral%p/literal/entry
***
*** 2314,2315 
--- 2324,2330 
  	row
+ 	 entryliteral%m/literal/entry
+ 	 entryTimestamp with milliseconds/entry
+ 	 entryNo/entry
+ 	/row
+ 	row
  	 entryliteral%i/literal/entry

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

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


Re: [PATCHES] [HACKERS] Contrib -- PostgreSQL shared variables

2004-08-25 Thread pgsql
 LockShared('name');

Hmmm, I thought about that, but it is *WAY* more complicated than it
looks. What if after a Lock the process crashes before it can call
Unlock? It is this problem that inspired the add and sub calls.




 [EMAIL PROTECTED] wrote:
 This is a first pass on a simple shared memory variable system for
 PostgreSQL. I would appriciate anyone interested in this functionality
 to
 rip it apart.

 It basically adds this functionality:

 SetShared('name', value);
 GetSharedInt('name');
 SetSharedText('name);
 RemovedShared('name');

 I also added two extra functions that are sort of a kludge, but could be
 very helpful.

 AddSharedInt('name', value);
 SubSharedInt('name', value);

 These add or subtect the 'value' from the variable and return the
 result.


 


 ---(end of broadcast)---
 TIP 9: the planner will ignore your desire to choose an index scan if
 your
   joining column's datatypes do not match



---(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] log_line_prefix additions

2004-08-25 Thread Ed L.
Attached also is a patch to comments in sample postgresql.conf file.

Subject: [PATCHES]  log_line_prefix additions
Date: Wednesday August 25 2004 3:26
From: Ed L. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

This patch against 8.0.0beta1 source adds log_line_prefix options for
millisecond timestamps (%m), remote host (%h), and remote port (%P).  The
milliseconds are useful for QPS measurements, and the remote port is
worthless to us as part of %r.

---


*** src/backend/utils/error/elog.c.orig	2004-08-25 12:37:26.0 -0600
--- src/backend/utils/error/elog.c	2004-08-25 15:05:34.0 -0600
***
*** 1347,1348 
--- 1347,1370 
  break;
+ 			case 'm':
+ {
+ 	time_t stamp_time;
+ 	char strfbuf[128];
+ 	struct timeval tv;
+ 	struct timezone tz = {0, 0};
+ 
+ 	gettimeofday(tv, tz);
+  	stamp_time = tv.tv_sec;
+ 
+ 	/* leave room for milliseconds... */
+ 	strftime(strfbuf, sizeof(strfbuf),
+ 		%Y-%m-%d %H:%M:%S %Z,
+ 		localtime(stamp_time));
+ 
+ 	/* 'paste' milliseconds into place... */
+  	sprintf(strfbuf+19, .%03d, 
+ 		(int)(tv.tv_usec/1000));
+ 
+ 	appendStringInfoString(buf, strfbuf);
+ }
+ break;
  			case 't':
***
*** 1394,1395 
--- 1416,1430 
  }
+ 			case 'h':
+ if (MyProcPort)
+ {
+ 	appendStringInfo(buf, %s, MyProcPort-remote_host);
+ }
+ break;
+ 			case 'P':
+ if (MyProcPort)
+ {
+ 	if (strlen(MyProcPort-remote_port)  0)
+ 		appendStringInfo(buf, %s,
+ 		 MyProcPort-remote_port);
+ }
  break;
*** ./doc/src/sgml/runtime.sgml.orig	2004-08-25 15:11:39.0 -0600
--- ./doc/src/sgml/runtime.sgml	2004-08-25 15:13:29.0 -0600
***
*** 2304,2305 
--- 2304,2315 
  	row
+ 	 entryliteral%h/literal/entry
+ 	 entryRemote Hostname or IP address/entry
+ 	 entryYes/entry
+ 	/row
+ 	row
+ 	 entryliteral%P/literal/entry
+ 	 entryRemote Port/entry
+ 	 entryYes/entry
+ 	/row
+ 	row
  	 entryliteral%p/literal/entry
***
*** 2314,2315 
--- 2324,2330 
  	row
+ 	 entryliteral%m/literal/entry
+ 	 entryTimestamp with milliseconds/entry
+ 	 entryNo/entry
+ 	/row
+ 	row
  	 entryliteral%i/literal/entry
*** src/backend/utils/misc/postgresql.conf.sample.orig	2004-08-25 16:01:19.0 -0600
--- src/backend/utils/misc/postgresql.conf.sample	2004-08-25 16:02:04.0 -0600
***
*** 225,227 
--- 225,229 
  # %r=remote host and port
+ # %h=remote host %P=port
  # %p=PID %t=timestamp %i=command tag
+ # %m=timestamp with milliseconds
  # %c=session id %l=session line number

---(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] add hint

2004-08-25 Thread James William Pye
On Wed, 2004-08-25 at 13:11, Tom Lane wrote:
 It'd be even better if it followed the message style guidelines...

Indeed.
I was unaware of the guidelines, but remedied that after a quick google.
http://www.postgresql.org/docs/current/static/error-style-guide.html

I assume the problem was only with the lack of capitalization and ending
punctuation(as hints and details are specified to have).
-- 
Regards,
James William Pye
Index: aclchk.c
===
RCS file: /projects/cvsroot/pgsql-server/src/backend/catalog/aclchk.c,v
retrieving revision 1.104
diff -u -r1.104 aclchk.c
--- aclchk.c	18 Jun 2004 06:13:19 -	1.104
+++ aclchk.c	25 Aug 2004 22:12:14 -
@@ -760,7 +760,8 @@
 		if (!pg_language_tuple-lanpltrusted)
 			ereport(ERROR,
 	(errcode(ERRCODE_WRONG_OBJECT_TYPE),
-	 errmsg(language \%s\ is not trusted, langname)));
+	 errmsg(language \%s\ is not trusted, langname),
+	 errhint(Only superusers may use untrusted languages.)));
 
 		/*
 		 * Note: for now, languages are treated as owned by the bootstrap


signature.asc
Description: This is a digitally signed message part


Re: [PATCHES] log_line_prefix additions

2004-08-25 Thread Andrew Dunstan

Ed L. wrote:
Attached also is a patch to comments in sample postgresql.conf file.
Subject: [PATCHES]  log_line_prefix additions
Date: Wednesday August 25 2004 3:26
From: Ed L. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
This patch against 8.0.0beta1 source adds log_line_prefix options for
millisecond timestamps (%m), remote host (%h), and remote port (%P).  The
milliseconds are useful for QPS measurements, and the remote port is
worthless to us as part of %r.
 

[snip]
+ 	struct timezone tz = {0, 0};
+ 
+ 	gettimeofday(tv, tz);
 



The timezone is pointless. Just pass NULL as the second argument to 
gettimeofday().

Also, I don't understand what you mean by the remote port being 
worthless to us as part of %r. Please explain.

cheers
andrew

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


Re: [PATCHES] add hint

2004-08-25 Thread Tom Lane
James William Pye [EMAIL PROTECTED] writes:
 I assume the problem was only with the lack of capitalization and ending
 punctuation(as hints and details are specified to have).

Yup, better.  Thanks.

regards, tom lane

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


Re: [PATCHES] log_line_prefix additions

2004-08-25 Thread Ed L.
On Wednesday August 25 2004 4:25, Andrew Dunstan wrote:
 From: Ed L. [EMAIL PROTECTED]

 To: [EMAIL PROTECTED]
 
 This patch against 8.0.0beta1 source adds log_line_prefix options for
 millisecond timestamps (%m), remote host (%h), and remote port (%P). 
  The milliseconds are useful for QPS measurements, and the remote port
  is worthless to us as part of %r.

 [snip]

 I don't understand what you mean by the remote port being
 worthless to us as part of %r. Please explain.

Worthless to us as part of %r means we don't use the remote port, and 
would rather not have it in our logs.  With %h, we can log what we want 
(hostname/IP), and others can still get both ip and port if they like with 
%h(%P) or %r.

Ed


---(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] Contrib -- PostgreSQL shared variables -with swap

2004-08-25 Thread pgsql
This new version contains, in addition to the previous version,
SwapShared(..) which allows you to swap a value in a variable.

sharedvar-040825.tgz
Description: application/unix-tar

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[PATCHES] Win32 bug fix

2004-08-25 Thread Claudio Natoli

Could someone please eyeball the attached patch for errors and as a
correction for:
http://archives.postgresql.org/pgsql-bugs/2004-08/msg00307.php

Also, could someone (Maksim?) please reproduce the bug on their system, and
then confirm that the patch corrects (as I seem unable to reproduce the bug,
which in itself is a mystery I don't have time to solve :-)

Cheers,
Claudio

--- 
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 
a
href=http://www.memetrics.com/emailpolicy.html;http://www.memetrics.com/em
ailpolicy.html/a
  



diff.patch
Description: Binary data

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match