[PATCHES] NLS: czech

2004-08-30 Thread Karel Zak
Hi,

attached is patch with Czech .po files updates (some files are new).

Tested with actual CVS:

patch -p1nls-cs-08292004.patch  

patching file src/bin/initdb/nls.mk
patching file src/bin/initdb/po/cs.po
patching file src/bin/pg_controldata/po/cs.po
patching file src/bin/pg_ctl/nls.mk
patching file src/bin/pg_ctl/po/cs.po
patching file src/bin/pg_resetxlog/po/cs.po
patching file src/interfaces/libpq/po/cs.po

.. so nothing dangerous.

Karel

PS. thanks to Michal Taborsky [EMAIL PROTECTED] who translated all in
this patch.

-- 
Karel Zak  [EMAIL PROTECTED]
http://home.zf.jcu.cz/~zakkr/


nls-cs-08292004.patch.gz
Description: GNU Zip compressed data

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


Re: [PATCHES] cygwin 8.0.0beta1 postmaster/syslogger.c, port/dirmod.c,

2004-08-30 Thread Reini Urban
Bruce Momjian schrieb:
Should I apply this change?
 #define TIMEZONE_GLOBAL ((int)_timezone)
yes, please.
I have no time yet, to come up with the better patch. It's already  monday.
---
Reini Urban wrote:
Bruce Momjian schrieb:
Your patch highlighted several bugs in our code.  First, I wasn't
testing for CYGWIN in the backend pgport_palloc code.  Second, I added
an #undef to prevent compiler warnings.  Third I added your Cygwin
includes with an #ifdef.  These will appear in beta2.
On the timezone issue, I see this in dt.h:

/* Global variable holding time zone information. */
#if !defined(__CYGWIN__)  !defined(WIN32)
#define TIMEZONE_GLOBAL timezone
#else
#define TIMEZONE_GLOBAL _timezone
#define tzname _tzname  /* should be in time.h? */
#endif
so are you saying your _timezone is time_t and not an int?  Sometimes it
is just a short because it is only minutes west of GMT, not an actually
seconds since 1970 or anything.  Making it time_t actually sounds like
overkill, but we can work around that in dt.h if indeed that is how your
OS defines it.  The easiest fix would probably be to add the cast to int
right in dt.h and only for Cygwin:
#define TIMEZONE_GLOBAL ((int)_timezone)
Does that work for you?
yes, that's better.
FYI /usr/include/time.h:
/* defines for the opengroup specifications Derived from Issue 1 of the 
SVID.  */
extern __IMPORT time_t _timezone;
...

BTW: I see that CYGWIN also has a struct timezone in sys/time.h, but 
configure didn't check for that.
I'll come with better patches after beta2.


---
Reini Urban wrote:

Attached patches are required for cygwin:
2004-08-24 21:23:53 [EMAIL PROTECTED]
* (postmaster/syslogger.c) struct timeval is
 declared in sys/time.h, not in time.h
2004-08-24 20:20:54 rurban:
* (port/dirmod.c) cygwin needs different header locations,
 and unlink is a macro. There are no pgport_palloc
 versions yet
timezone/pgtz.c:
Pending is a patch against postgresql-8.0.0beta1/config/c-library.m4:
PGAC_VAR_INT_TIMEZONE
In the meantime I've hacked it with a cast from time_t to (int) in
timezone/pgtz.c: get_timezone_offset
but timezone really is of time_t, not int. I don't know what you are 
trying to do here.

There's on remaining issue for the cygwin build:
../../src/port/libpgport.a(dirmod.o)(.text+0x5ee):dirmod.c: undefined 
reference to `__imp__CurrentMemoryContext'
../../src/port/libpgport.a(dirmod.o)(.text+0x64b):dirmod.c: undefined 
reference to `__imp__CurrentMemoryContext'

which explains the pgport_palloc problem.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

2004-08-24 20:20:54 rurban: 
	* cygwin needs different header locations, and unlink is a macro
	* There are no pgport_palloc versions yet

--- postgresql-8.0.0beta1/src/port/dirmod.c.orig2004-08-08 07:44:36.0 
+0100
+++ postgresql-8.0.0beta1/src/port/dirmod.c 2004-08-24 19:20:56.557435000 +0100
@@ -33,16 +33,28 @@
#include miscadmin.h
+
+#ifdef __CYGWIN__
+#include windows.h
+#include w32api/winioctl.h
+#else
#include winioctl.h
+#undef unlink
+#endif
#undef rename
-#undef unlink
+/* 2004-08-24 20:20:54 rurban: There are no pgport_palloc versions yet */
+#if 0 
#ifndef FRONTEND
+#undef palloc
+#undef pstrdup
+#undef pfree
#define palloc(sz)	pgport_palloc(sz)
#define pstrdup(str)	pgport_pstrdup(str)
#define pfree(pointer)	pgport_pfree(pointer)
#endif
+#endif

/*

2004-08-24 21:23:53 [EMAIL PROTECTED]
* struct timeval is declared in sys/time.h, not in time.h
--- postgresql-8.0.0beta1/src/backend/postmaster/syslogger.c.orig   2004-08-06 
20:17:31.0 +0100
+++ postgresql-8.0.0beta1/src/backend/postmaster/syslogger.c2004-08-24 
20:21:26.057851800 +0100
@@ -28,6 +28,7 @@
#include signal.h
#include time.h
#include unistd.h
+#include sys/time.h
#include sys/stat.h
#include libpq/pqsignal.h

--- postgresql-8.0.0beta1/src/timezone/pgtz.c.orig  2004-07-31 20:12:15.0 
+0100
+++ postgresql-8.0.0beta1/src/timezone/pgtz.c   2004-08-24 19:56:30.686367800 +0100
@@ -97,9 +97,9 @@
return tm-tm_gmtoff;
#elif defined(HAVE_INT_TIMEZONE)
#ifdef HAVE_UNDERSCORE_TIMEZONE
-   return -_timezone;
+   return -(int)_timezone;
#else
-   return -timezone;
+   return -(int)timezone;
#endif
#else
#error No way to determine TZ? Can this happen?

---(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


Index: src/backend/utils/mmgr/mcxt.c
===
RCS file: /cvsroot/pgsql-server/src/backend/utils/mmgr/mcxt.c,v
retrieving revision 1.47

Re: [PATCHES] dbsize contrib

2004-08-30 Thread Andreas Pflug
Gavin Sherry wrote:
The attached patch contributes:
- database_size(name)
- relation_size(text)

I sent in a dbsize patch to make these functions tablespace aware...
AFAIR your patch was applied, but it misses tables in non-default 
tablespaces.

Regards,
Andreas
---(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


Re: [PATCHES] dbsize contrib

2004-08-30 Thread Gavin Sherry
On Mon, 30 Aug 2004, Andreas Pflug wrote:

 Gavin Sherry wrote:

 The attached patch contributes:
 
 - database_size(name)
 - relation_size(text)
 
 
  I sent in a dbsize patch to make these functions tablespace aware...

 AFAIR your patch was applied, but it misses tables in non-default
 tablespaces.

Ahh. There is a thoughto in my patch. The ifdef should have been
HAVE_SYMLINK not SYMLINK. With HAVE_SYMLINK the current code works fine.

That being said, your patch seems to clean up the code some whilst adding
more functionality.

Gavin

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [PATCHES] log_filename_prefix -- log_filename + strftime()

2004-08-30 Thread Tom Lane
Ed L. [EMAIL PROTECTED] writes:
 On Saturday August 28 2004 9:30, Bruce Momjian wrote:
 Are we going to change this before beta2?  I have not seen a final
 patch yet.

 Attached is a revised patch:

Applied with minor revisions.

 I did not add UTC offset logic nor logic to shift to top of the hour/day for 
 rotation periods of 60/1440 minutes, but would like to add that shortly if 
 time permits.

I did the latter but not the former -- ie, rotation target times are
rounded off, but rounded with respect to GMT not local time.  I didn't
see an obviously correct behavior of round-to-local-time across DST
transitions ...

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] log_filename_prefix -- log_filename + strftime()

2004-08-30 Thread Ed L.
On Monday August 30 2004 10:56, Tom Lane wrote:
 Ed L. [EMAIL PROTECTED] writes:
 
  Attached is a revised patch:

 Applied with minor revisions.

  I did not add UTC offset logic nor logic to shift to top of the
  hour/day for rotation periods of 60/1440 minutes, but would like to add
  that shortly if time permits.

 I did the latter but not the former -- ie, rotation target times are
 rounded off, but rounded with respect to GMT not local time.  I didn't
 see an obviously correct behavior of round-to-local-time across DST
 transitions ...

One idea for handling the round-to-localtime issue from the other end of the 
problem:  optionally rotate logs upon an *interpolated* filename change.  
Then, 'server_log.%a' would cause a rotation when strftime() thinks it's 
midnight local, 'server_log.%H' would rotate at the top of the hour, etc.  
Possibly a half-baked idea.

I also noticed pg_tm.tm_gmtoff is apparently not set, at least not for my 
local (US MT).

Ed


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [PATCHES] log_filename_prefix -- log_filename + strftime()

2004-08-30 Thread Tom Lane
Ed L. [EMAIL PROTECTED] writes:
 One idea for handling the round-to-localtime issue from the other end of the 
 problem:  optionally rotate logs upon an *interpolated* filename change.  

The code-as-committed wants to be able to predict the time change in
advance.  I'm not totally wedded to that, but I don't want to do a
strftime every time through the main loop, either ...

 I also noticed pg_tm.tm_gmtoff is apparently not set, at least not for my 
 local (US MT).

It works for me.  You want to look into why not for you?

regards, tom lane

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