[PATCHES] small typo in DTrace docs

2008-06-12 Thread Euler Taveira de Oliveira

Hi,

Attached is a small patch to fix some typos in probes.d path.


--
  Euler Taveira de Oliveira
  http://www.timbira.com/
Index: doc/src/sgml/monitoring.sgml
===
RCS file: /a/pgsql/dev/anoncvs/pgsql/doc/src/sgml/monitoring.sgml,v
retrieving revision 1.59
diff -c -r1.59 monitoring.sgml
*** doc/src/sgml/monitoring.sgml15 May 2008 00:17:39 -  1.59
--- doc/src/sgml/monitoring.sgml13 Jun 2008 04:42:57 -
***
*** 1190,1196 
  
 
  
!  Add the probe definitons to src/backend/src/utils/probes.d
  
 
  
--- 1190,1196 
  
 
  
!  Add the probe definitons to src/backend/utils/probes.d
  
 
  
***
*** 1224,1230 
 
  
   Add probe transaction__start(int); to
!  src/backend/src/utils/probes.d, and it should look like the 
following:
  
  provider postgresql {
...
--- 1224,1230 
 
  
   Add probe transaction__start(int); to
!  src/backend/utils/probes.d, and it should look like the 
following:
  
  provider postgresql {
...
***
*** 1247,1253 
  
   At compile time, transaction__start is converted to a macro called
   TRACE_POSTGRESQL_TRANSACTION_START, and it resides in
!  src/backend/src/utils/probes.h. Before recompiling, add
   the single line macro to the appropriate location in the source code.
   In this case, it looks like the following: 
  
--- 1247,1253 
  
   At compile time, transaction__start is converted to a macro called
   TRACE_POSTGRESQL_TRANSACTION_START, and it resides in
!  src/backend/utils/probes.h. Before recompiling, add
   the single line macro to the appropriate location in the source code.
   In this case, it looks like the following: 
  

-- 
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches


Re: [PATCHES] Simplify formatting.c

2008-05-20 Thread Euler Taveira de Oliveira

Tom Lane wrote:


Also, it seems a bit inconsistent to be relying on
oracle_compat.c for upper/lower but not initcap.

I saw this inconsistence while I'm doing the patch. What about moving 
that upper/lower/initcap and wcs* code to another file. pg_locale.c? 
BTW, formatting.c and oracle_compat.c already include pg_locale.h.



--
  Euler Taveira de Oliveira
  http://www.timbira.com/

--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches


Re: [PATCHES] lc_time and localized dates

2008-05-17 Thread Euler Taveira de Oliveira

Bruce Momjian wrote:


I have reviewed this patch.  I like the method you used, but I did find
a few things I had to change.


Good catch. I tested here and it seems ok. Thanks for your review.


--
  Euler Taveira de Oliveira
  http://www.timbira.com/

--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches


Re: [PATCHES] pg_dump lock timeout - resend

2008-05-17 Thread Euler Taveira de Oliveira

Joshua D. Drake wrote:

The pages could certainly stand an updating to reflect how development 
currently commences. I will work up a patch next week.



IMHO, this development information needs to be at [1].

[1] http://www.postgresql.org/developer/roadmap


--
  Euler Taveira de Oliveira
  http://www.timbira.com/

--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches


Re: [PATCHES] pg_dump lock timeout - resend

2008-05-17 Thread Euler Taveira de Oliveira

daveg wrote:


I originally sent this a week ago, but there was no response and I do not
see it

Nope. FYI, the right link is [1] and your patch [2] is in the queue for 
July Commit Fest.


[1] http://wiki.postgresql.org/wiki/Development_information
[2] http://wiki.postgresql.org/wiki/CommitFest:July


--
  Euler Taveira de Oliveira
  http://www.timbira.com/

--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches


Re: [PATCHES] lc_time and localized dates

2008-04-23 Thread Euler Taveira de Oliveira

Bruce Momjian wrote:


Euler, have you updated this patch yet?

Here is an updated patch. It follows the Oracle behaviour and uses a 
cache mechanism to avoid calling setlocale() all the time. I unified the 
localized_* and str_* functions.  I didn't test it on Windows. I would 
appreciate some feedback.



euler=# select to_char(now(), 'dy tmDy tmDay mon tmMON tmmonth ');
  to_char
---
 thu Qui Quinta apr ABR abril 2008
(1 registro)

euler=# set lc_time to 'it_IT.UTF-8';
SET
euler=# select to_char(now(), 'dy tmDy tmDay mon tmMON tmmonth ');
   to_char
-
 thu Gio Giovedì apr APR aprile 2008
(1 registro)

euler=# set lc_time to 'es_ES.UTF-8';
SET
euler=# select to_char(now(), 'dy tmDy tmDay mon tmMON tmmonth ');
  to_char
---
 thu Jue Jueves apr ABR abril 2008
(1 registro)

euler=# set lc_time to 'fr_FR.UTF-8';
SET
euler=# select to_char(now(), 'dy tmDy tmDay mon tmMON tmmonth ');
 to_char
--
 thu Jeu Jeudi apr AVR avril 2008
(1 registro)

euler=# set lc_time to 'cs_CZ.UTF-8';
SET
euler=# select to_char(now(), 'dy tmDy tmDay mon tmMON tmmonth ');
  to_char
-----------
 thu Čt Čtvrtek apr DUB duben 2008
(1 registro)


--
  Euler Taveira de Oliveira
  http://www.timbira.com/


l10ntochar.diff.gz
Description: GNU Zip compressed data

-- 
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches


Re: [PATCHES] lc_time and localized dates

2008-04-15 Thread Euler Taveira de Oliveira

Bruce Momjian wrote:


Euler, have you updated this patch yet?

I'm in a process to submit another patch but I want to test on Windows 
first.



--
  Euler Taveira de Oliveira
  http://www.timbira.com/

--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches


Re: [PATCHES] [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit

2008-03-09 Thread Euler Taveira de Oliveira

Tom Lane wrote:


Well, there is exactly zero chance of that happening in 8.3.x, because
the bit allocations for on-disk tsvector representation are already
determined.  It's fairly hard to see a way of doing it in future
releases that would have acceptable costs, either.


I think you missed my point or i didn't explain it in details. I'm
talking about doing the error-or-notice condition to be a guc variable
(eg ignore_tsearch_limits = on/off).


But more to the point: no matter what the document length limit is,
why should it be a hard error to exceed it?  The downside of not
indexing words beyond the length limit is that searches won't find
documents in which the search terms occur only very far into the
document.  The downside of throwing an error is that we can't store such
documents at all, which surely guarantees that searches won't find
them.  How can you possibly argue that that option is better?

IMHO, both of the approaches are "bad"; that's why i propose an user 
option. So the user can choose between to be strict (error out when it 
exceeds some limit) and to relax (emit a notice when it exceeds some 
limit). Maybe some day we can increase the limits (eg ts_type.h redesign).



--
  Euler Taveira de Oliveira
  http://www.timbira.com/


--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches


Re: [PATCHES] [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit

2008-03-06 Thread Euler Taveira de Oliveira

Tom Lane wrote:


I don't think that follows.  A tsearch index is lossy anyway, so there's
no hard and fast reason why it should reject entries that it can't index
completely.  I think it would be more useful to index whatever it can
(probably just the words in the first N bytes of the document) than to
prevent you from storing the document.

The problem with this approach is how to select the part of the document 
to index. How will you ensure you're not ignoring the more important 
words of the document?
IMHO Postgres shouldn't decide it; it would be good if an user could set 
it runtime and/or on postgresql.conf.



--
  Euler Taveira de Oliveira
  http://www.timbira.com/

--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches


Re: [PATCHES] [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit

2008-03-06 Thread Euler Taveira de Oliveira

Edwin Groothuis wrote:


Is it possible to make it a WARNING instead of an ERROR? Right now I get:

No. All of the other types emit an ERROR if you're trying an out of 
range value.



--
  Euler Taveira de Oliveira
  http://www.timbira.com/

--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://mail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&extra=pgsql-patches


Re: [PATCHES] lc_time and localized dates

2008-02-26 Thread Euler Taveira de Oliveira

Tom Lane wrote:


But as Peter remarks nearby, this discussion is wasted anyway, because
there is only one correct answer: whatever Oracle does with these
cases is what to_char() should do.

My patch does exactly what Oracle does besides one thing: my code does 
not contain a real capitalization function. It sucks when we have 
composite names like the portuguese above. I'll post an updated version 
later.


SQL> SELECT TO_CHAR(SYSDATE, 'DY dy DAY Day day MONTH Month MON Mon 
mon', 'NLS_DATE_LANGUAGE = czech') FROM dual;


TO_CHAR(SYSDATE,'DYDYDAYDAYDAYMONTHMONTHMONMONMON','NLS_DAT
---

UT ut UTERY   Utery   utery   UNOR Unor UNO Uno uno

SQL> SELECT TO_CHAR(SYSDATE, 'DY dy DAY Day day MONTH Month MON Mon 
mon', 'NLS_DATE_LANGUAGE = dutch') FROM dual;


TO_CHAR(SYSDATE,'DYDYDAYDAYDAYMONTHMONTHMONMONMON','NLS_DATE_LANGUA

---

DI di DINSDAG   Dinsdag   dinsdag   FEBRUARI  Februari  FEB Feb feb

SQL> SELECT TO_CHAR(SYSDATE, 'DY dy DAY Day day MONTH Month MON Mon 
mon', 'NLS_DATE_LANGUAGE = portuguese') FROM dual;


TO_CHAR(SYSDATE,'DYDYDAYDAYDAYMONTHMONTHMONMONMON','NLS_DATE_LANGUAGE=PORTUGUESE'

-------------

TER ter TERCA-FEIRA   Terca-Feira   terca-feira   FEVEREIRO Fevereiro 
FEV Fev fev



--
  Euler Taveira de Oliveira
  http://www.timbira.com/

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


Re: [PATCHES] lc_time and localized dates

2008-02-26 Thread Euler Taveira de Oliveira

Zdenek Kotala wrote:

But how you handle situation when you have multi language application 
which needs correct output for all languages? You cannot use any of the 
pattern because it will be wrong for some group of languages.


FYI, strftime() [1] doesn't say anything about capitalization. I don't 
know if some translators are aware of it and even if they are, how would 
they know that a day or month is the first word of a sentence? IMHO we 
should provide X, x, and X so the programmer can use 
whatever he/she thinks is correct for him/her.


[1] http://www.opengroup.org/onlinepubs/009695399/functions/strftime.html


--
  Euler Taveira de Oliveira
  http://www.timbira.com/

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


Re: [PATCHES] lc_time and localized dates

2008-02-26 Thread Euler Taveira de Oliveira

Zdenek Kotala wrote:

Yes it is. Only if it is a first word in a sentence or name you should 
use "Ú". Also name of day is 'pondělí' (Monday) with small p


But we're not talking about *sentence*, we need to consider just the 
*word*. So I think TMMonth should be Xxxx, TMMONTH should be 
, and TMmonth should be .
If you want to ensure lowercase in months, you could use TMmonth instead 
of TMMonth.



--
  Euler Taveira de Oliveira
  http://www.timbira.com/


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


Re: [PATCHES] lc_time and localized dates

2008-02-26 Thread Euler Taveira de Oliveira

Gevik Babakhani wrote:


Have you tested this patch on MSVC and MinGW (Windows) builds?
changing LC_MESSAGES/LC_TIME will most probably break the Windows behavior.

No. [Looking at the code...] I think it only affects the LC_MESSAGES 
'cause setlocale(LC_MESSAGES) don't work on Windows.



AFAIK, some locales like the Dutch doesn't have capitalized first letters
for month/day. 
Making the first letter capitalized for all values would be incorrect.


Even if we have just the month word? Don't consider a sentence in this 
case. We're talking about a formatting function so you can choose if you 
want it capitalized or not. Is it ok to output TMDay as 'Dinsdag' ?



--
  Euler Taveira de Oliveira
  http://www.timbira.com/

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

  http://www.postgresql.org/docs/faq


Re: [PATCHES] lc_time and localized dates

2008-02-25 Thread Euler Taveira de Oliveira

Zdenek Kotala wrote:

Please, Day names does not have capitalized first letter in Czech 
language. We have "pondeli" as a Monday. If locale does not do that it 
is probably intention :-).


Hmmm... I don't know about that. I do it that way 'cause I'm concerned 
about some locales that don't capitalize (see above). In my head,

(i) 'TMMonth' is February, Fevereiro, Febrero, Únor;
(ii) 'TMmonth' is february, fevereiro, febrero, únor;
(iii) 'TMMONTH' is FEBRUARY, FEVEREIRO, FEBRERO, ÚNOR.

How would we handle that case? Is it wrong to write "Únor"?

euler=# set lc_time to 'cs_CZ';
SET
euler=# select to_char(now(), 'TMDay TMDy TMMon TMMonth');
   to_char
-
 Pondìlí Po úno únor
(1 registro)

euler=# set lc_time to 'es_ES';
SET
euler=# select to_char(now(), 'TMDay TMDy TMMon TMMonth');
to_char
---
 lunes lun feb febrero
(1 registro)

euler=# set lc_time to 'fr_FR';
SET
euler=# select to_char(now(), 'TMDay TMDy TMMon TMMonth');
to_char
---
 lundi lun fév février
(1 registro)

euler=# set lc_time to 'it_IT';
SET
euler=# select to_char(now(), 'TMDay TMDy TMMon TMMonth');
 to_char
-
 lunedì lun feb febbraio
(1 registro)

euler=# set lc_time to 'hu_HU';
SET
euler=# select to_char(now(), 'TMDay TMDy TMMon TMMonth');
   to_char
--
 hétfõ h febr február
(1 registro)


--
  Euler Taveira de Oliveira
  http://www.timbira.com/

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


[PATCHES] lc_time and localized dates

2008-02-25 Thread Euler Taveira de Oliveira

Hi,

Attached is a patch that replaces the lc_messages with lc_time when 
using to_char in translation mode (TM) [1]. It doesn't change the output 
behaviour. Per discussion [2], it's using some cache mechanism so we 
don't need to call setlocale() all the time.


Some issues:
(i) some locales don't capitalize the first letter. I'm using 
pg_toupper() to do the job but I'm afraid it's not appropriated. I'm 
using it 'cause i'm too lazy to move localized_str_toupper(). Any 
suggestions?
(ii) it didn't address the problem spotted at [3][4]. IMHO, it's ok for 
a non-superuser to set lc_time. Opinions?


euler=# show lc_time;
 lc_time
-
 pt_BR
(1 registro)

euler=# select to_char(now(), 'TMDay Day dy, DD TMMon Month TMmonth ');
to_char

 Segunda Mondaymon, 25 Fev February  fevereiro 2008
(1 registro)

euler=# set lc_time to 'es_ES';
SET
euler=# select to_char(now(), 'TMDay Day dy, DD TMMon Month TMmonth ');
  to_char

 Lunes Mondaymon, 25 Feb February  febrero 2008
(1 registro)

euler=# set lc_time to 'de_DE';
SET
euler=# select to_char(now(), 'TMDay Day dy, DD TMMon Month TMmonth ');
   to_char
-
 Montag Mondaymon, 25 Feb February  februar 2008
(1 registro)

euler=# set lc_time to 'fr_FR';
SET
euler=# select to_char(now(), 'TMDay Day dy, DD TMMon Month TMmonth ');
  to_char

 Lundi Mondaymon, 25 Fév February  février 2008
(1 registro)

euler=# set lc_time to 'C';
SET
euler=# select to_char(now(), 'TMDay Day dy, DD TMMon Month TMmonth ');
   to_char
--
 Monday Mondaymon, 25 Feb February  february 2008
(1 registro)




[1] http://archives.postgresql.org/pgsql-hackers/2006-11/msg00539.php
[2] http://archives.postgresql.org/pgsql-hackers/2006-11/msg00693.php
[3] http://archives.postgresql.org/pgsql-hackers/2007-10/msg00214.php
[4] http://archives.postgresql.org/pgsql-hackers/2006-11/msg00692.php


--
  Euler Taveira de Oliveira
  http://www.timbira.com/


l10ntochar.diff.gz
Description: GNU Zip compressed data

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


[PATCHES] pt_BR FAQ update

2007-11-30 Thread Euler Taveira de Oliveira
Hi,

I updated the brazilian FAQ; it's in [1]. I'm attaching a small patch
that adds a forgotten question and change < to <.

[1] http://timbira.com/tmp/FAQ_brazilian.html


-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/
*** ./doc/src/FAQ/FAQ.html.orig	2007-11-30 22:39:02.0 -0200
--- ./doc/src/FAQ/FAQ.html	2007-11-30 22:40:06.0 -0200
***
*** 127,133 
  
  General Questions
  
! 1.1) What is PostgreSQL? How is it pronounced?
  
  PostgreSQL is pronounced Post-Gres-Q-L.  (For those curious
  about how to say "PostgreSQL", an General Questions
  
! 1.1) What is PostgreSQL? How is it pronounced? What is Postgres?
  
  PostgreSQL is pronounced Post-Gres-Q-L.  (For those curious
  about how to say "PostgreSQL", an 
  
! In PostgreSQL versions < 8.3, PL/PgSQL caches function scripts, and
  an unfortunate side effect is that if a PL/PgSQL function accesses a
  temporary table, and that table is later dropped and recreated, and
  the function called again, the function will fail because the cached
--- 1051,1057 
  does not exist" errors when accessing temporary tables in PL/PgSQL
  functions?
  
! In PostgreSQL versions < 8.3, PL/PgSQL caches function scripts, and
  an unfortunate side effect is that if a PL/PgSQL function accesses a
  temporary table, and that table is later dropped and recreated, and
  the function called again, the function will fail because the cached

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


Re: [PATCHES] [HACKERS] wrong behavior using to_char() again

2007-11-22 Thread Euler Taveira de Oliveira
Bruce Momjian wrote:

> OK, I researched this and realized it should have been obvious to me
> when I added this code in 2006 that making the thousands separator
> always "," for a locale of "" was going to cause a problem.
> 
I tested your patch and IMHO it breaks the glibc behavior. I'm providing
a SQL script [1] and a diff [2] showing the differences between before
and after applying it. In [2], I see a lot of common used (pt_*, es_*,
and fr_*) locales that we'll be changed. Is it the behavior we want to
support? I think we shouldn't try to fix glibc bug inside PostgreSQL (in
this case, use should accept "" as a possible value for thousands_sep).


> I don't think there is any change needed for the C locale.  That part
> seems fine, as Alvaro already pointed out.
> 
I don't know about C locale, but it's broken too. In PostgreSQL, it's
following the en_US behavior. Comments?

[EMAIL PROTECTED]:/a/pgsql$ ./a.out C
decimal_point: "."
thousands_sep: ""
[EMAIL PROTECTED]:/a/pgsql$ ./a.out en_US
decimal_point: "."
thousands_sep: ","

[1] http://timbira.com/tmp/lcn3.sql
[2] http://timbira.com/tmp/lcnumeric.diff


-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/

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

   http://archives.postgresql.org


[PATCHES] pt_BR FAQ update

2007-10-07 Thread Euler Taveira de Oliveira
Hi,

An updated pt_BR FAQ patch is attached. If you prefer the complete
version, you can get it [1]. There is also a small typo fix.


[1] http://timbira.com/tmp/FAQ_brazilian.html

-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/


faq.diff.gz
Description: GNU Zip compressed data
*** ./doc/src/FAQ/FAQ.html.orig	2007-10-07 19:32:25.0 -0300
--- ./doc/src/FAQ/FAQ.html	2007-10-07 19:32:41.0 -0300
***
*** 1097,1103 
  4.21) Why are my table and column names not
  recognized in my query?  Why is capitalization not preserved?
  
! The most common cause of recognized names is the use of
  double-quotes around table or column names during table creation.
  When double-quotes are used, table and column names (called
  identifiers) are stored 4.21) Why are my table and column names not
  recognized in my query?  Why is capitalization not preserved?
  
! The most common cause of unrecognized names is the use of
  double-quotes around table or column names during table creation.
  When double-quotes are used, table and column names (called
  identifiers) are stored 
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [PATCHES] Implementation of aggregate functions

2007-09-20 Thread Euler Taveira de Oliveira
sayali k wrote:

> I am keen in implementing certain additional aggregate
> functions like percentage, standard deviation etc. I
> would like to know the complexity of this and also the
> parts of the code which would have to be modified for
> the same,
> 
This is the wrong list to ask this kind of question. Use pgsql-hackers
instead.
Some statistics functions [1] are already implemented in PostgreSQL.
Samples are in utils/adt/float.c.

[1]
http://www.postgresql.org/docs/8.2/static/functions-aggregate.html#FUNCTIONS-AGGREGATE-STATISTICS-TABLE


-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/

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


Re: [PATCHES] COPY with no WAL, in certain circumstances

2007-01-06 Thread Euler Taveira de Oliveira
Joshua D. Drake wrote:

> > IMHO, this deserves an GUC parameter (use_wal_in_copy?). Because a lot
> > of people use COPY because it's faster than INSERT but expects that it
> > will be in WAL. The default would be use_wal_in_copy = true.
> 
> That I don't think makes sense. A copy is an all or nothing option, if a
> copy fails in the middle the whole thing is rolled back. 
> 
I was worried about PITR, but Simon answers my question: PITR enables so
uses WAL.

-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/


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


Re: [PATCHES] COPY with no WAL, in certain circumstances

2007-01-06 Thread Euler Taveira de Oliveira
Simon Riggs wrote:

> As discussed on -hackers, its possible to avoid writing any WAL at all
> for COPY in these circumstances:
> 
Cool.

> The enclosed patch implements this, as discussed. There is no user
> interface to enable/disable, just as with CTAS and CREATE INDEX; no
> docs, just code comments.
> 
IMHO, this deserves an GUC parameter (use_wal_in_copy?). Because a lot
of people use COPY because it's faster than INSERT but expects that it
will be in WAL. The default would be use_wal_in_copy = true.


-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/


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

   http://www.postgresql.org/docs/faq


Re: [PATCHES] xlog directory at initdb time

2007-01-03 Thread Euler Taveira de Oliveira
Peter Eisentraut wrote:

> On the name of the option, it's not actually a "data" directory, so I'd just 
> call it --xlogdir, parallel to --datadir.
> 
Seems reasonable. Patch modified is attached.


-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/
*** ./doc/src/sgml/ref/initdb.sgml.orig 2006-09-15 21:30:18.0 -0300
--- ./doc/src/sgml/ref/initdb.sgml  2007-01-03 23:34:13.0 -0200
***
*** 177,182 
--- 177,193 
   
  
   
+   -X directory
+   --xlogdir=directory
+   
+
+ This option specifies the directory where the transaction log
+ should be stored. This option is only supported on systems that 
support symbolic links.
+
+   
+  
+ 
+  
-U username
--username=username

*** ./src/bin/initdb/initdb.c.orig  2006-12-22 22:43:12.0 -0200
--- ./src/bin/initdb/initdb.c   2007-01-03 23:34:45.0 -0200
***
*** 95,100 
--- 95,101 
  static bool debug = false;
  static bool noclean = false;
  static bool show_setting = false;
+ static char *xlog_dir = "";
  
  
  /* internal vars */
***
*** 112,117 
--- 113,120 
  static char *system_views_file;
  static bool made_new_pgdata = false;
  static bool found_existing_pgdata = false;
+ static bool made_new_xlogdir = false;
+ static bool found_existing_xlogdir = false;
  static char infoversion[100];
  static bool caught_signal = false;
  static bool output_failed = false;
***
*** 163,169 
  static char *get_id(void);
  static char *get_encoding_id(char *encoding_name);
  static char *get_short_version(void);
! static intcheck_data_dir(void);
  static bool mkdatadir(const char *subdir);
  static void set_input(char **dest, char *filename);
  static void check_input(char *path);
--- 166,172 
  static char *get_id(void);
  static char *get_encoding_id(char *encoding_name);
  static char *get_short_version(void);
! static intcheck_data_dir(char *dir);
  static bool mkdatadir(const char *subdir);
  static void set_input(char **dest, char *filename);
  static void check_input(char *path);
***
*** 610,615 
--- 613,636 
fprintf(stderr, _("%s: failed to remove 
contents of data directory\n"),
progname);
}
+ 
+   if (made_new_xlogdir)
+   {
+   fprintf(stderr, _("%s: removing transaction log 
directory \"%s\"\n"),
+   progname, xlog_dir);
+   if (!rmtree(xlog_dir, true))
+   fprintf(stderr, _("%s: failed to remove 
transaction log directory\n"),
+   progname);
+   }
+   else if (found_existing_xlogdir)
+   {
+   fprintf(stderr,
+   _("%s: removing contents of transaction 
log directory \"%s\"\n"),
+   progname, xlog_dir);
+   if (!rmtree(xlog_dir, false))
+   fprintf(stderr, _("%s: failed to remove 
contents of transaction log directory\n"),
+   progname);
+   }
/* otherwise died during startup, do nothing! */
}
else
***
*** 618,623 
--- 639,649 
fprintf(stderr,
  _("%s: data directory \"%s\" not removed at user's 
request\n"),
progname, pg_data);
+ 
+   if (made_new_xlogdir || found_existing_xlogdir)
+   fprintf(stderr,
+ _("%s: transaction log directory \"%s\" not removed 
at user's request\n"),
+   progname, xlog_dir);
}
  
exit(1);
***
*** 919,931 
  }
  
  /*
!  * make sure the data directory either doesn't exist or is empty
   *
   * Returns 0 if nonexistent, 1 if exists and empty, 2 if not empty,
   * or -1 if trouble accessing directory
   */
  static int
! check_data_dir(void)
  {
DIR*chkdir;
struct dirent *file;
--- 945,957 
  }
  
  /*
!  * make sure the directory either doesn't exist or is empty
   *
   * Returns 0 if nonexistent, 1 if exists and empty, 2 if not empty,
   * or -1 if trouble accessing directory
   */
  static int
! check_data_dir(char *dir)
  {
DIR*chkdir;
struct dirent *file;
***
*** 933,939 
  
errno = 0;
  
!   chkdir = opendir(pg_data);
  
if (!chkdir)
return (errn

Re: [PATCHES] xlog directory at initdb time

2006-12-28 Thread Euler Taveira de Oliveira
Simon Riggs wrote:

> > This simple patch lets someone specifies the xlog directory at initdb
> > time. It uses symlinks to do it, and create and/or set permissions at
> > the directory as appropriate.
> 
> Looks good.
> 
> I'm no expert on coding style, so I won't comment on anything there.
> 
> Any test harness changes? Or a test script?
> 
Unfortunately, nope. :( I tested it manually.
How did i test it?

1) xlog directory doesn't exist -- OK
2) xlog directory exists -- OK
3) xlog directory exists but doesn't have the right permissions --
FAILED
4) xlog diretory exists but is not empty -- FAILED
5) interrupting initdb execution (Ctrl-C) to test the cleanup code -- OK

PS> i didn't test it in a win32 box but it should be ok.

-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/


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


[PATCHES] xlog directory at initdb time

2006-12-26 Thread Euler Taveira de Oliveira
Hi,
This simple patch lets someone specifies the xlog directory at initdb
time. It uses symlinks to do it, and create and/or set permissions at
the directory as appropriate.

-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/
*** ./doc/src/sgml/ref/initdb.sgml.orig 2006-12-23 22:08:13.0 -0200
--- ./doc/src/sgml/ref/initdb.sgml  2006-12-23 17:38:03.0 -0200
***
*** 177,182 
--- 177,193 
   
  
   
+   -X directory
+   --xlogdata=directory
+   
+
+ This option specifies the directory where the transaction log
+ should be stored. This option is only supported on systems that 
support symbolic links.
+
+   
+  
+ 
+  
-U username
--username=username

*** ./src/bin/initdb/initdb.c.orig  2006-12-24 16:56:46.0 -0200
--- ./src/bin/initdb/initdb.c   2006-12-24 18:07:01.0 -0200
***
*** 95,100 
--- 95,101 
  static bool debug = false;
  static bool noclean = false;
  static bool show_setting = false;
+ static char *xlog_data = "";
  
  
  /* internal vars */
***
*** 112,117 
--- 113,120 
  static char *system_views_file;
  static bool made_new_pgdata = false;
  static bool found_existing_pgdata = false;
+ static bool made_new_xlogdata = false;
+ static bool found_existing_xlogdata = false;
  static char infoversion[100];
  static bool caught_signal = false;
  static bool output_failed = false;
***
*** 163,169 
  static char *get_id(void);
  static char *get_encoding_id(char *encoding_name);
  static char *get_short_version(void);
! static intcheck_data_dir(void);
  static bool mkdatadir(const char *subdir);
  static void set_input(char **dest, char *filename);
  static void check_input(char *path);
--- 166,172 
  static char *get_id(void);
  static char *get_encoding_id(char *encoding_name);
  static char *get_short_version(void);
! static intcheck_data_dir(char *dir);
  static bool mkdatadir(const char *subdir);
  static void set_input(char **dest, char *filename);
  static void check_input(char *path);
***
*** 610,615 
--- 613,636 
fprintf(stderr, _("%s: failed to remove 
contents of data directory\n"),
progname);
}
+ 
+   if (made_new_xlogdata)
+   {
+   fprintf(stderr, _("%s: removing transaction log 
directory \"%s\"\n"),
+   progname, xlog_data);
+   if (!rmtree(xlog_data, true))
+   fprintf(stderr, _("%s: failed to remove 
transaction log directory\n"),
+   progname);
+   }
+   else if (found_existing_xlogdata)
+   {
+   fprintf(stderr,
+   _("%s: removing contents of transaction 
log directory \"%s\"\n"),
+   progname, xlog_data);
+   if (!rmtree(xlog_data, false))
+   fprintf(stderr, _("%s: failed to remove 
contents of transaction log directory\n"),
+   progname);
+   }
/* otherwise died during startup, do nothing! */
}
else
***
*** 618,623 
--- 639,649 
fprintf(stderr,
  _("%s: data directory \"%s\" not removed at user's 
request\n"),
progname, pg_data);
+ 
+   if (made_new_xlogdata || found_existing_xlogdata)
+   fprintf(stderr,
+ _("%s: transaction log directory \"%s\" not removed 
at user's request\n"),
+   progname, xlog_data);
}
  
exit(1);
***
*** 919,931 
  }
  
  /*
!  * make sure the data directory either doesn't exist or is empty
   *
   * Returns 0 if nonexistent, 1 if exists and empty, 2 if not empty,
   * or -1 if trouble accessing directory
   */
  static int
! check_data_dir(void)
  {
DIR*chkdir;
struct dirent *file;
--- 945,957 
  }
  
  /*
!  * make sure the directory either doesn't exist or is empty
   *
   * Returns 0 if nonexistent, 1 if exists and empty, 2 if not empty,
   * or -1 if trouble accessing directory
   */
  static int
! check_data_dir(char *dir)
  {
DIR*chkdir;
struct dirent *file;
***
*** 933,939 
  
errno = 0;
  
!   chkdir = opendir(pg_data);
  
if (!chkdir)
return (errno == ENOENT) ? 0 : -1;
--- 95

Re: [PATCHES] Brazilian FAQ update

2006-11-17 Thread Euler Taveira de Oliveira
Euler Taveira de Oliveira wrote:
> This is an updated version of Brazilian FAQ [1]. If you prefer [2] is
> the diff file.
> Please apply it.
> 
> [1] http://timbira.com/pg/FAQ_brazilian.html
> [2] http://timbira.com/pg/faq.diff
> 
Where are we on this?

-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/


---(end of broadcast)---
TIP 1: 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


[PATCHES] small typo in backup docs

2006-10-29 Thread Euler Taveira de Oliveira
Hi,

There is a small typo in backup documentation.


-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/
*** backup.sgml.orig2006-10-29 14:00:13.0 -0200
--- backup.sgml 2006-10-29 14:00:21.0 -0200
***
*** 1430,1436 
  
 
  Sample code for the C version of the restore_command
! would be be:
  
  triggered = false;
  while (!NextWALFileReady() && !triggered)
--- 1430,1436 
  
 
  Sample code for the C version of the restore_command
! would be:
  
  triggered = false;
  while (!NextWALFileReady() && !triggered)

---(end of broadcast)---
TIP 1: 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


[PATCHES] Brazilian FAQ update

2006-10-16 Thread Euler Taveira de Oliveira
Hi,

This is an updated version of Brazilian FAQ [1]. If you prefer [2] is
the diff file.
Please apply it.

[1] http://timbira.com/pg/FAQ_brazilian.html
[2] http://timbira.com/pg/faq.diff


-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/


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


[PATCHES] small FAQ patch

2006-10-14 Thread Euler Taveira de Oliveira
Hi,

This is a small cosmetic patch that adds pt_BR IRC channel to the lists
of IRC channels, fixes a typo in the OID's question, and corrects the
PGCluster's project name.


-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/
*** FAQ.html.orig   2006-10-14 14:27:30.0 -0300
--- FAQ.html2006-10-14 14:28:01.0 -0300
***
*** 236,243 
  (irc.freenode.net).  To connect you can use the Unix
  program irc -c '#postgresql' "$USER" irc.freenode.net
  or use any other IRC clients.  A Spanish one also exists
! on the same network, (#postgresql-es), and a French one,
! (#postgresqlfr).  There is also a PostgreSQL channel on EFNet.
  
  A list of commercial support companies is available at http://www.postgresql.org/support/professional_support";>
--- 236,244 
  (irc.freenode.net).  To connect you can use the Unix
  program irc -c '#postgresql' "$USER" irc.freenode.net
  or use any other IRC clients.  A Spanish one also exists
! on the same network, (#postgresql-es), a French one,
!   (#postgresqlfr), and a Brazilian one, (#postgresql-br).
!   There is also a PostgreSQL channel on EFNet.
  
  A list of commercial support companies is available at http://www.postgresql.org/support/professional_support";>
***
*** 963,969 
  being duplicated. PostgreSQL uses OIDs to link its
  internal system tables together.
  
! To uniquely number columns in user tables, it is best to use
  SERIAL rather than OIDs because
  SERIAL sequences are unique only within a single
  table. and are therefore less likely to overflow.
--- 964,970 
  being duplicated. PostgreSQL uses OIDs to link its
  internal system tables together.
  
! To uniquely number rows in user tables, it is best to use
  SERIAL rather than OIDs because
  SERIAL sequences are unique only within a single
  table. and are therefore less likely to overflow.
***
*** 1077,1083 
  Multi-master replication allows read/write queries to be sent to
  multiple replicated computers.  This capability also has a severe impact
  on performance due to the need to synchronize changes between servers. 
! http://pgfoundry.org/projects/pgcluster/";>Pgcluster is the
  most popular such solution freely available for PostgreSQL.
  
  There are also commercial and hardware-based replication solutions
--- 1078,1084 
  Multi-master replication allows read/write queries to be sent to
  multiple replicated computers.  This capability also has a severe impact
  on performance due to the need to synchronize changes between servers. 
! http://pgfoundry.org/projects/pgcluster/";>PGCluster is the
  most popular such solution freely available for PostgreSQL.
  
  There are also commercial and hardware-based replication solutions

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


[PATCHES] minor improvements in messages

2006-10-01 Thread Euler Taveira de Oliveira
Hi,

Attached is a patch to make some sentences consistent with similar ones.

-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/
*** ./src/backend/access/transam/twophase.c.orig2006-10-01 
12:42:49.0 -0300
--- ./src/backend/access/transam/twophase.c 2006-10-01 12:46:46.0 
-0300
***
*** 1250,1256 
if (errno != ENOENT || giveWarning)
ereport(WARNING,
(errcode_for_file_access(),
!  errmsg("could not remove two-phase state 
file \"%s\": %m",
  path)));
  }
  
--- 1250,1256 
if (errno != ENOENT || giveWarning)
ereport(WARNING,
(errcode_for_file_access(),
!  errmsg("could not remove twophase state file 
\"%s\": %m",
  path)));
  }
  
*** ./src/backend/commands/aggregatecmds.c.orig 2006-10-01 12:43:02.0 
-0300
--- ./src/backend/commands/aggregatecmds.c  2006-10-01 14:19:42.0 
-0300
***
*** 219,225 
{
/* we only get here if stmt->missing_ok is true */
ereport(NOTICE,
!   (errmsg("aggregate %s(%s) does not exist ... 
skipping",
NameListToString(aggName),

TypeNameListToString(aggArgs;
return;
--- 219,225 
{
/* we only get here if stmt->missing_ok is true */
ereport(NOTICE,
!   (errmsg("aggregate %s(%s) does not exist, 
skipping",
NameListToString(aggName),

TypeNameListToString(aggArgs;
return;
*** ./src/backend/commands/functioncmds.c.orig  2006-10-01 12:43:19.0 
-0300
--- ./src/backend/commands/functioncmds.c   2006-10-01 14:19:59.0 
-0300
***
*** 690,696 
{
/* can only get here if stmt->missing_ok */
ereport(NOTICE,
!   (errmsg("function %s(%s) does not exist ... 
skipping",
NameListToString(functionName),

TypeNameListToString(argTypes;
return;
--- 690,696 
{
/* can only get here if stmt->missing_ok */
ereport(NOTICE,
!   (errmsg("function %s(%s) does not exist, 
skipping",
NameListToString(functionName),

TypeNameListToString(argTypes;
return;
*** ./src/backend/commands/operatorcmds.c.orig  2006-10-01 12:43:56.0 
-0300
--- ./src/backend/commands/operatorcmds.c   2006-10-01 14:21:16.0 
-0300
***
*** 218,224 
 if (stmt->missing_ok &&!OidIsValid(operOid) )
 {
 ereport(NOTICE,
!(errmsg("operator %s does not exist ... skipping",
 NameListToString(operatorName;
 return;
 }
--- 218,224 
 if (stmt->missing_ok &&!OidIsValid(operOid) )
 {
 ereport(NOTICE,
!(errmsg("operator %s does not exist, skipping",
 NameListToString(operatorName;
 return;
 }
*** ./src/backend/commands/proclang.c.orig  2006-10-01 12:44:10.0 
-0300
--- ./src/backend/commands/proclang.c   2006-10-01 14:21:34.0 -0300
***
*** 401,407 
 errmsg("language \"%s\" does not 
exist", languageName)));
else 
ereport(NOTICE,
!   (errmsg("language \"%s\" does not exist 
... skipping", 
languageName)));
   
return;
--- 401,407 
 errmsg("language \"%s\" does not 
exist", languageName)));
else 
ereport(NOTICE,
!   (errmsg("language \"%s\" does not 
exist, skipping", 
languageName)));
   
return;
*** ./src/backend/commands/tablespace.c.orig2006-10-01 12:44:26.0 
-0300
--- ./src/backend/commands/tablespace.c 2006-10-01 14:21:49.0

[PATCHES] cosmetic change in 'drop owned' reference

2006-09-18 Thread Euler Taveira de Oliveira
Hi,

This is cosmetic patch that puts the parameters in the correct order (same
as other similar commands).


-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/

x
Description: Binary data

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


Re: current version: [PATCHES] Patch - Have psql show current values

2006-05-05 Thread Euler Taveira de Oliveira

Bruce Momjian wrote:


What fields do we want to show?  Maybe the TODO item is not needed.  Is
this all we want to show?


IRC what we want is something like this.

regression=# \d abc
  Sequence "public.abc"
Column|  Type
--+-
sequence_name | abc
last_value| 1
increment_by  | 1
max_value | 9223372036854775807
min_value | 1
cache_value   | 1
log_cnt   | 1
is_cycled | f
is_called | f


Because "\d abc" doesn't show us any important information.

regression=# \d abc
  Sequence "public.abc"
Column |  Type
---+-
 sequence_name | name
 last_value| bigint
 increment_by  | bigint
 max_value | bigint
 min_value | bigint
 cache_value   | bigint
 log_cnt   | bigint
 is_cycled | boolean
 is_called | boolean


Last year, I made a patch for this but it was so ugly that I didn't send 
 to -patches. Maybe Bruce's solution (\x & select * from seq) could be 
hardcoded in describe.c.


--
  Euler Taveira de Oliveira
  http://www.timbira.com/

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

  http://www.postgresql.org/docs/faq


Re: [PATCHES] [HACKERS] to_char and i18n

2005-12-25 Thread Euler Taveira de Oliveira
--- Euler Taveira de Oliveira <[EMAIL PROTECTED]> escreveu:

> I have a patch like this. But this was for 7.4.x. I have to take a
> look
> at it.
>
The patch is attached. It implements day and month i18n. I fixed a few
misspelling comments. Docs is attached too.

template1=# select to_char(now(), 'Day, DD Month ');
   to_char
--
 Sunday   , 25 December  2005
(1 registro)

template1=# select to_char(now(), 'TMDay, DD TMMonth ');
  to_char  
---
 Domingo, 25 Dezembro 2005
(1 registro)

template1=# 


Comments?

Euler Taveira de Oliveira
euler[at]yahoo_com_br








___ 
Yahoo! doce lar. Faça do Yahoo! sua homepage. 
http://br.yahoo.com/homepageset.html 


i18n-date.diff
Description: 1242239392-i18n-date.diff

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

   http://www.postgresql.org/docs/faq


[PATCHES] small typo

2005-10-16 Thread Euler Taveira de Oliveira
Hi,

This is a small typo in guc.c.


Euler Taveira de Oliveira
euler[at]yahoo_com_br








___ 
Promoção Yahoo! Acesso Grátis: a cada hora navegada você acumula cupons e 
concorre a mais de 500 prêmios! Participe! http://yahoo.fbiz.com.br/

guc.diff
Description: 4257893311-guc.diff

---(end of broadcast)---
TIP 1: 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] Translation updates: pt_BR

2005-10-06 Thread Euler Taveira de Oliveira

--- Peter Eisentraut <[EMAIL PROTECTED]> escreveu:

> Euler Taveira de Oliveira wrote:
> > > If you want we could also replicate the older branches in the
> > > pgtranslation repository.  Is there interest in that?
> >
> > I think so. At least those branches that are maintained yet.
> 
> OK, I'll try to do that but I have to figure out how to retroactively
> 
> insert a CVS branch.
> 

Just commit in the maintained stable branches: REL7_4_STABLE and
REL8_0_STABLE.

$ cvs commit -m "msg" -r RELX_Y_STABLE file1 file2 ...

Maybe you need a more complex script to do the job.


Euler Taveira de Oliveira
euler[at]yahoo_com_br








___ 
Novo Yahoo! Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e 
muito mais. Instale agora! 
www.yahoo.com.br/messenger/

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


Re: [PATCHES] Translation updates: pt_BR

2005-10-05 Thread Euler Taveira de Oliveira
Hi Peter,

> 
> If you want we could also replicate the older branches in the 
> pgtranslation repository.  Is there interest in that?
> 
I think so. At least those branches that are maintained yet.


Euler Taveira de Oliveira
euler[at]yahoo_com_br








___ 
Novo Yahoo! Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e 
muito mais. Instale agora! 
www.yahoo.com.br/messenger/

---(end of broadcast)---
TIP 1: 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] Translation updates: pt_BR

2005-10-04 Thread Euler Taveira de Oliveira
Hi Alvaro,

> > This is the translation updates for 7.4.x [1] and 8.0.x [2]. Please
> try
> > to include them before release.
> 
> The new 7.4 and 8.0 releases are already out :-(
> 
I saw the announce now. :( But it could be included in the CVS.

> Are you aware of the pgtranslations project in pgfoundry?  You could
> commit them yourself there, and they will be folded back to main
> Postgres "automatically".
> 
Yeah. I'm subscribed. I took a look at it and saw that I can't update
older branches. How can we "fix" it?


Euler Taveira de Oliveira
euler[at]yahoo_com_br








___ 
Novo Yahoo! Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e 
muito mais. Instale agora! 
www.yahoo.com.br/messenger/

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


[PATCHES] Translation updates: pt_BR

2005-10-04 Thread Euler Taveira de Oliveira
Hi,

This is the translation updates for 7.4.x [1] and 8.0.x [2]. Please try
to include them before release. I'll send the 8.1 update ASAP.

[1] http://br.geocities.com/eulerto/backend74.po.gz
[2] http://br.geocities.com/eulerto/pg80.tgz

Regards,


Euler Taveira de Oliveira
euler[at]yahoo_com_br








___ 
Novo Yahoo! Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e 
muito mais. Instale agora! 
www.yahoo.com.br/messenger/

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


[PATCHES] reindexdb into scripts

2005-07-03 Thread Euler Taveira de Oliveira
Hi,

Sorry for the delay. I'm too busy the last days. Based in the
discussions [1], here is a patch that translate the reindexdb shell
script to a C program. Like the other scripts, this is a wrapper for
REINDEX. Docs are include but need some improvement.

Hope that it could be included in 8.1.

http://archives.postgresql.org/pgsql-hackers/2005-06/msg01578.php


Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Internet rápida e grátis. 
Instale o discador agora! http://br.acesso.yahoo.com/

reindexdb.tgz
Description: 431253405-reindexdb.tgz

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


Re: [PATCHES] limiting connections per user/database

2005-06-26 Thread Euler Taveira de Oliveira
Hi Petr,

> One more thing, do you have more concerns about that max connection
> out 
> of the fact it uses pgstat ?
> For example are guc variables ok for this or should it be new
> variable 
> in pg_shadow & pg_database etc - I would like to rewrite it just once
> or 
> twice not ten times.
> 
IIRC, people want the last one. We have more control if we can set it
per user or per database. Talking about pgstat, I think you can rely on
it 'cause it can be disabled. Could you describe the design you
intended to implement?


Euler Taveira de Oliveira
euler[at]yahoo_com_br

__
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 

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


Re: [PATCHES] uptime function to postmaster

2005-06-06 Thread Euler Taveira de Oliveira
Hi Bruce,

> I think we should return intervals only when we can't return
> meaningful
> timestamp values. I don't have any logic to back up that opinion,
> though.
> 
Agreed.

> 
> We need to preceed our function names with pg_ for cases like this
> where
> we are supplying pg-specific behavior.
> 
Agreed.

An updated version of the patch is attached. It is just implement
'pg_start_time' function that works in multi-user and stand-alone. Docs
is attached too.

Comments?


Euler Taveira de Oliveira
euler[at]yahoo_com_br

__
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 

uptime6.diff
Description: 958887538-uptime6.diff

---(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] uptime function to postmaster

2005-06-06 Thread Euler Taveira de Oliveira
Hi Bruce,

> 
> I think we are best with just pg_startime.  If people want the
> interval
> they can subtract it from CURRENT_TIMESTAMP.  I have added Matthias's
> version to the patch queue.
> 
> 
OK. But IIRC the Matthias implementation doesn't work in standalone
mode. And talking about the 'interval', I think it's too ugly make
this:
select CURRENT_TIMESTAMP - pg_starttime();

Isn't it more simple do this?
select pg_uptime();

I think few people will use start_time and more people will use uptime
that's why I propose the 'uptime' function.

Talking abouts names, IMHO we need to go with uptime() and
start_time(). Why? That's because a system function and it's about
server. When we implement backend uptime, we can go with
connection_uptime() and connection_start_time().

Comments?

Euler Taveira de Oliveira
euler[at]yahoo_com_br

__
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 

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


[PATCHES] Translation updates: pt_BR

2005-05-09 Thread Euler Taveira de Oliveira
Hi,

This is translation updates for branchs 7.4 and 8.0.

http://br.geocities.com/eulerto/nls_74_pt-br.tgz
http://br.geocities.com/eulerto/nls_80_pt-br.tgz

Please apply.


Euler Taveira de Oliveira
euler[at]yahoo_com_br

__
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 

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


Re: [PATCHES] DELETE ... USING

2005-04-06 Thread Euler Taveira de Oliveira
Hi Neil,

> Looking at how to implement this, there is some rather dodgy code in 
> warnAutoRange() in parse_relation.c that only emits the notice about 
> adding a missing FROM clause entry if the query already has at least
> one 
> range table entry in its FROM clause. The idea appears to be to not 
> issue warnings about queries like "SELECT foo.*;", but it also means
> we 
> don't end up warning about DELETE and UPDATE.
> 
> I think the right fix is to remove the "inFromCl" check, and always 
> issue a notice. With add_missing_from=true, all these queries are 
> rejected anyway, so I think it makes sense to warn about all of them 
> when add_missing_from is disabled. Objections?
> 
No. That's why I'm thinking now while looking at the code :) Could you
provide a patch?


Euler Taveira de Oliveira
euler[at]yahoo_com_br





Yahoo! Acesso Grátis - Internet rápida e grátis. 
Instale o discador agora! http://br.acesso.yahoo.com/

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

   http://archives.postgresql.org


Re: [PATCHES] DELETE ... USING

2005-04-04 Thread Euler Taveira de Oliveira
Hi Neil,


> > BTW, this patch is lacking ruleutils.c support.  Put a DELETE USING
> > into a rule and see whether pg_dump will dump the rule correctly
> ...
> 
> Good catch; a revised patch is attached.
> 
Greate job. But I'm worried about add_missing_from enabled. See:

euler=# delete from t3 using t1 where b > 500;
DELETE 4
euler=# select * from t3;
 x | y 
---+---
(0 rows)

In this case, I 'forget' to do the join and it delete all rows from t3.
I know that user needs to pay attention, but ... What about default
add_missing_from to off?

The other case is:

euler=# select * from t1 where t1.a = t3.x;
NOTICE:  adding missing FROM-clause entry for table "t3"
NOTICE:  adding missing FROM-clause entry for table "t3"
 a | b  
---+
 5 | 10
(1 row)

euler=# delete from t1 where t1.a = t3.x;
DELETE 1
euler=# 

I think we need at least a NOTICE here. Of course it could be extended
to UPDATE too.

BTW, what about regression tests for UPDATE ... FROM?

PS> all examples are extracted from regression database.



Euler Taveira de Oliveira
euler[at]yahoo_com_br





Yahoo! Acesso Grátis - Internet rápida e grátis. 
Instale o discador agora! http://br.acesso.yahoo.com/

---(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] problem with CR+LF in files in psql \i command

2005-03-26 Thread Euler Taveira de Oliveira
Hi Bruce,

> Function and comments are just _strings_ to PostgreSQL, so we have no
> good way of cleaning the output up, unless we hack pg_dump to somehow
> change line endings when outputting such information, though
> currently we
> don't.  The would perhaps cause problems in viewing the functions if
> restored in Win32.
> 
Agreed.

> Fixing it at the \i level is too crude because it might remove
> carriage
> returns that are wanted in the input stream.
> 
Agreed.

> We are open to ideas on how to improve this.
> 
What about another option to pg_dump to indicate such a thing? Maybe -l
or --change-line [m|w|u]

Another TODO item?


Euler Taveira de Oliveira
euler[at]yahoo_com_br

__
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 

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


Re: [PATCHES] uptime function to postmaster

2005-01-20 Thread Euler Taveira de Oliveira

Bruce Momjian wrote:
> 
> This has been saved for the 8.1 release:
> 
>   http:/momjian.postgresql.org/cgi-bin/pgpatches2
> 
>
---
> 

Hi,

I redo this patch adding the funcionality that Matthias implemented
(starttime). Basically I changed the uptime()'s return type to 
'interval' (more funcional now, uh?) and rework in the Matthias 
function (start_time()). The last one return type is 'timestamp with 
time zone'. The docs are attached to, but maybe need some
work on it.

Comments?



=
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. 
http://br.acesso.yahoo.com/ - Internet rápida e grátis*** ./doc/src/sgml/func.sgml.orig   2005-01-20 18:23:48.0 -0200
--- ./doc/src/sgml/func.sgml2005-01-20 16:44:52.0 -0200
***
*** 8060,8065 
--- 8060,8077 

  

+start_time()
+timestamp with time zone
+PostgreSQL startup date and time
+   
+ 
+   
+uptime()
+interval
+PostgreSQL uptime information
+   
+ 
+   
 user
 name
 equivalent to current_user
***
*** 8157,8162 
--- 8169,8192 
 
  
 
+ start_time
+
+ 
+
+  start_time() returns the timestamp with time zone
+  which the PostgreSQL was started.
+
+ 
+
+ uptime
+
+ 
+
+  uptime() returns the PostgreSQL
+  uptime information.
+
+ 
+
  version
 
  
*** ./src/backend/postmaster/postmaster.c.orig  2005-01-20 18:24:36.0 
-0200
--- ./src/backend/postmaster/postmaster.c   2005-01-20 16:44:52.0 
-0200
***
*** 221,226 
--- 221,229 
  bool  ClientAuthInProgress = false;   /* T during new-client

 * authentication */
  
+ /* Backend startup time */
+ TimestampTz   StartTime;
+ 
  /*
   * State for assigning random salts and cancel keys.
   * Also, the global MyCancelKey passes the cancel key assigned to a given
***
*** 329,334 
--- 332,338 
InheritableSocket pgStatPipe0;
InheritableSocket pgStatPipe1;
pid_t PostmasterPid;
+   TimestampTz StartTime;
  #ifdef WIN32
HANDLE PostmasterHandle;
HANDLE initial_signal_pipe;
***
*** 371,376 
--- 375,383 
char   *userDoption = NULL;
int i;
  
+   AbsoluteTimeStartTimeSec;   /* integer part */
+   int StartTimeUSec;  /* microsecond part */
+ 
/* This will call exit() if strdup() fails. */
progname = get_progname(argv[0]);   
  
***
*** 915,920 
--- 922,933 
 */
StartupPID = StartupDataBase();
  
+   /*
+* Get start up time
+*/
+   StartTimeSec = GetCurrentAbsoluteTimeUsec(&StartTimeUSec);
+   StartTime = AbsoluteTimeUsecToTimestampTz(StartTimeSec, StartTimeUSec);
+ 
status = ServerLoop();
  
/*
***
*** 3669,3674 
--- 3682,3688 
write_inheritable_socket(¶m->pgStatPipe1, pgStatPipe[1], childPid);
  
param->PostmasterPid = PostmasterPid;
+   param->StartTime = StartTime;
  
  #ifdef WIN32
param->PostmasterHandle = PostmasterHandle;
***
*** 3871,3876 
--- 3885,3891 
read_inheritable_socket(&pgStatPipe[1], ¶m->pgStatPipe1);
  
PostmasterPid = param->PostmasterPid;
+   StartTime = param->StartTime;
  
  #ifdef WIN32
PostmasterHandle = param->PostmasterHandle;
*** ./src/backend/tcop/postgres.c.orig  2005-01-20 18:39:18.0 -0200
--- ./src/backend/tcop/postgres.c   2005-01-20 18:15:07.0 -0200
***
*** 144,149 
--- 144,152 
  #endif   /* TCOP_DONTUSENEWLINE */
  
  
+ /* Backend startup time */
+ TimestampTz   StartTime;
+ 
  /* 
   *decls for routines only used in this file
   * 
***
*** 2217, 
--- 2220,2228 
sigjmp_buf  local_sigjmp_buf;
volatile bool send_rfq = true;
  
+   AbsoluteTimeStartTimeSec;   /* integer part */
+   int StartTimeUSec;  /* microsecond part */
+ 
  #define PendingConfigOption(name,val) \
(guc_names = lappend(guc_names, pstrdup(name)), \
 guc_values = lappend(guc_values, pstrdup(val)))
***
*** 2896,2901 
--- 2902,2916 
send_rfq = true;/* initially, o

[PATCHES] Translation updates: pt_BR

2005-01-15 Thread Euler Taveira de Oliveira
Hi,

This is another translation update for pt_BR.
http://br.geocities.com/eulerto/pg/nls_pt-br.tgz

Please apply it before the new release (if possible).


=
Euler Taveira de Oliveira
euler[at]yahoo_com_br

__
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 

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


[PATCHES] FAQ update: pt_BR

2005-01-15 Thread Euler Taveira de Oliveira
Hi,

This is an update for FAQ_brazilian.html.

Please apply to HEAD (before release if possible).


=
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. 
http://br.acesso.yahoo.com/ - Internet rápida e grátis

faq-pt-br.diff.gz
Description: faq-pt-br.diff.gz

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

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


[PATCHES] Small fix in FAQ

2005-01-15 Thread Euler Taveira de Oliveira
Hi,

This is a small fix in FAQ.html.

Please apply it to HEAD.


=
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. 
http://br.acesso.yahoo.com/ - Internet rápida e grátis

faq.diff
Description: faq.diff

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


[PATCHES] Translation updates: pt_BR

2005-01-07 Thread Euler Taveira de Oliveira
Hi,

Sorry for the delay. This is a heavily revised version of the pt_BR
message files.
http://br.geocities.com/eulerto/pg/nls_pt-br.tgz

Please apply it before the Official Release.



=
Euler Taveira de Oliveira
euler[at]yahoo_com_br

__
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 

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


Re: [PATCHES] uptime function to postmaster

2004-12-21 Thread Euler Taveira de Oliveira
Hi Alvaro,

> 
> > Patch updated. I improved the function output too.
> 
> Is it really a good idea to have a new file for only one function?
> We regularly see complaints about not wanting to do basic source code
> cleanup because not wanting to disrupt CVS history ...
> 
I couldn't see a good place to put it. Any suggestion?



=====
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. 
http://br.acesso.yahoo.com/ - Internet rápida e grátis

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

   http://archives.postgresql.org


Re: [PATCHES] uptime function to postmaster

2004-12-21 Thread Euler Taveira de Oliveira
Hi,

 
> > > This patch just implement a function that returns the uptime of
> the
> > > postmaster.
> > 
> > Doesn't work in EXEC_BACKEND case.
> > 
> Sorry. I'll fix this.
> 
Patch updated. I improved the function output too.

Comments?


=
Euler Taveira de Oliveira
euler[at]yahoo_com_br

__
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 

uptime3.diff
Description: uptime3.diff

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


Re: [PATCHES] uptime function to postmaster

2004-12-19 Thread Euler Taveira de Oliveira
Hi Tom,

> > This patch just implement a function that returns the uptime of the
> > postmaster.
> 
> Doesn't work in EXEC_BACKEND case.
> 
Sorry. I'll fix this.


=
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. 
http://br.acesso.yahoo.com/ - Internet rápida e grátis

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


[PATCHES] uptime function to postmaster

2004-12-19 Thread Euler Taveira de Oliveira
Hi,

This patch just implement a function that returns the uptime of the
postmaster. The docs are included too.
Another TODO item could be implement a function that returns the
startup time. If nobody objects I can do it.
Finally, I do not forbid non-superusers to execute it, but we can do
this if you prefer.
Comments?

Please review it and apply it.

PS> Hold it for 8.1.


=====
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. 
http://br.acesso.yahoo.com/ - Internet rápida e grátis

uptime2.diff
Description: uptime2.diff

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

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


[PATCHES] DELETE FROM foo USING bar

2004-12-19 Thread Euler Taveira de Oliveira
Hi,

This patch allows additional tables to be specified in DELETE for joins
(from TODO list). Basically I ripped the code from UPDATE ... FROM and
hacked the grammar. The docs are include too. The tab-complete part
needs more work.

Please review it and apply.


=
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. 
http://br.acesso.yahoo.com/ - Internet rápida e grátis

delete-using2.diff
Description: delete-using2.diff

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

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


[PATCHES] Translation updates: pt_BR

2004-12-10 Thread Euler Taveira de Oliveira
Hi,

This is a fully reviewed version of pt_BR message files. Please apply
it to HEAD.

http://br.geocities.com/eulerto/pg/nls_pt-br.tgz

This another one, just resolved some fuzzy translations in 7.4. Please
apply it to 7.4 branch.

http://br.geocities.com/eulerto/pg/postgres.po.gz



=
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Mail - Agora com 250MB de espaço gratuito. Abra 
uma conta agora! http://br.info.mail.yahoo.com/

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


[PATCHES] pt_BR FAQ update

2004-12-10 Thread Euler Taveira de Oliveira
Hi,

This little patch change my e-mail address in the FAQ. If it's possible
yet, please apply it to HEAD.



=
Euler Taveira de Oliveira
euler[at]yahoo_com_br

__
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 

faq.diff
Description: faq.diff

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

   http://archives.postgresql.org


[PATCHES] pt_BR FAQ updated

2004-11-24 Thread Euler Taveira de Oliveira
Hi,

Attached is a patch to up to date the brazilian FAQ. I included some
typo fixes too.

Please apply.

PS> Do not consider the last patch I sent to correct the typos, they
are included in this patch.


=====
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! 
http://br.acesso.yahoo.com/

faq.diff
Description: faq.diff

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


[PATCHES] fix typos in pt_br FAQ

2004-11-03 Thread Euler Taveira de Oliveira
Hi,

Attached is a patch that correct two typos in pt_BR FAQ.

Please apply.


=
Euler Taveira de Oliveira
euler[at]yahoo_com_br

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

faq_pt_br.diff
Description: faq_pt_br.diff

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


[PATCHES] Translation updates: pt_BR

2004-10-30 Thread Euler Taveira de Oliveira
Hi,

Here is another update for pt_BR message files. I updated some comments
and some fuzzy/untranslated messages. It's too big so I put it here:
http://br.geocities.com/eulerto/pg/nls_pt_br.tgz

Please apply.


=
Euler Taveira de Oliveira
euler[at]yahoo_com_br

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


[PATCHES] Translation updates: pt_BR

2004-10-18 Thread Euler Taveira de Oliveira
Hi,

I just updated the pt_BR translation. The URL above contain a tarball
with all the updates.
http://br.geocities.com/eulerto/pg/pg_pt-br.tgz

Please apply.



=
Euler Taveira de Oliveira
euler[at]yahoo_com_br

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

   http://archives.postgresql.org


[PATCHES] pg_config translation to pt_BR

2004-10-06 Thread Euler Taveira de Oliveira
Hi,

Here is a patch to available the first translation of pg_config. The
files attached needs to be in src/bin/pg_config. Basically, it is two
files (nls.mk, pt_BR.po) and one directory (po/).

Please apply.


=
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! 
http://br.acesso.yahoo.com/

pg_config.tgz
Description: pg_config.tgz

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

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


[PATCHES] pg_config fixes

2004-10-05 Thread Euler Taveira de Oliveira
Hi,

This simple patch fixes a typo, ensure pg_config is removed in win32
and correct some splitted message mistake.

Please apply.

PS> I'll send the translated file soon.


=====
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! 
http://br.acesso.yahoo.com/*** ./src/bin/pg_config/Makefile.orig   2004-10-05 15:10:04.0 -0300
--- ./src/bin/pg_config/Makefile2004-10-05 15:11:48.0 -0300
***
*** 1,6 
  #-
  #
! # Makefile for src/bin/pg_controldata
  #
  # Copyright (c) 1998-2002, PostgreSQL Global Development Group
  #
--- 1,6 
  #-
  #
! # Makefile for src/bin/pg_config
  #
  # Copyright (c) 1998-2002, PostgreSQL Global Development Group
  #
***
*** 28,34 
$(mkinstalldirs) $(DESTDIR)$(bindir)
  
  uninstall:
!   rm -f $(DESTDIR)$(bindir)/pg_config
  
  clean distclean maintainer-clean:
rm -f pg_config$(X) $(OBJS)
--- 28,34 
$(mkinstalldirs) $(DESTDIR)$(bindir)
  
  uninstall:
!   rm -f $(DESTDIR)$(bindir)/pg_config$(X)
  
  clean distclean maintainer-clean:
rm -f pg_config$(X) $(OBJS)
*** ./src/bin/pg_config/pg_config.c.orig2004-10-05 15:32:13.0 -0300
--- ./src/bin/pg_config/pg_config.c 2004-10-05 15:32:18.0 -0300
***
*** 38,51 
printf(_("  %s OPTION...\n\n"), progname);
printf(_("Options:\n"));
printf(_("  --bindir  show location of user executables\n"));
!   printf(_("  --includedir  show location of C header files of the 
client\n"));
!   printf(_("interfaces\n"));
printf(_("  --includedir-server   show location of C header files for the 
server\n"));
printf(_("  --libdir  show location of object code libraries\n"));
printf(_("  --pkglibdir   show location of dynamically loadable 
modules\n"));
printf(_("  --pgxsshow location of extension makefile\n"));
!   printf(_("  --configure   show options given to 'configure' script 
when\n"));
!   printf(_("PostgreSQL was built\n"));
printf(_("  --version show the PostgreSQL version, then exit\n"));
printf(_("  --helpshow this help, then exit\n\n"));
printf(_("Report bugs to <[EMAIL PROTECTED]>.\n"));
--- 38,51 
printf(_("  %s OPTION...\n\n"), progname);
printf(_("Options:\n"));
printf(_("  --bindir  show location of user executables\n"));
!   printf(_("  --includedir  show location of C header files of the 
client\n"
!"interfaces\n"));
printf(_("  --includedir-server   show location of C header files for the 
server\n"));
printf(_("  --libdir  show location of object code libraries\n"));
printf(_("  --pkglibdir   show location of dynamically loadable 
modules\n"));
printf(_("  --pgxsshow location of extension makefile\n"));
!   printf(_("  --configure   show options given to 'configure' script 
when\n"
!"PostgreSQL was built\n"));
printf(_("  --version show the PostgreSQL version, then exit\n"));
printf(_("  --helpshow this help, then exit\n\n"));
printf(_("Report bugs to <[EMAIL PROTECTED]>.\n"));

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

   http://archives.postgresql.org


[PATCHES] Cosmetic changes

2004-09-30 Thread Euler Taveira de Oliveira
Hi,
This small patch correct a hint style and change from multiple to
single line comment because gettext seems not to like multiple line
comments. Then we could see the "translator: ..." in po files too.


=====
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! 
http://br.acesso.yahoo.com/

cosmetic.diff
Description: cosmetic.diff

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


[PATCHES] pg_dump translation update: pt_BR

2004-09-29 Thread Euler Taveira de Oliveira
Hi,

This is the pg_dump translation update. Please apply it to HEAD.

=
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! 
http://br.acesso.yahoo.com/

pg_dump.po.bz2
Description: pg_dump.po.bz2

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


[PATCHES] FAQ pt_BR updated

2004-09-29 Thread Euler Taveira de Oliveira
Hi Bruce,

This is a small update for FAQ_brazilian.html. Don't forget to generate
the text version.


=
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! 
http://br.acesso.yahoo.com/

faq_pt_br_html.diff
Description: faq_pt_br_html.diff

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


[PATCHES] Translation updates for pt_BR

2004-09-28 Thread Euler Taveira de Oliveira
Hi,

Attached is the initdb, libpq, pg_controldata, pg_ctl, pg_resetxlog,
psql and scripts translation updates. Note that pg_ctl have to be added
to nls.mk
Please apply.


=
Euler Taveira de Oliveira
euler[at]yahoo_com_br





___ 
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! 
http://br.acesso.yahoo.com/

pg_cvs_pt_br.tar.bz2
Description: pg_cvs_pt_br.tar.bz2

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

   http://archives.postgresql.org


[PATCHES] correct docbook version

2004-07-31 Thread Euler Taveira de Oliveira
Hi,

I saw some inconsistence in the docbook version. Here is a patch that just correct it.

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


docbook.diff
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] translation updates pt_BR

2004-06-11 Thread Euler Taveira de Oliveira
Hi Peter,

> Euler Taveira de Oliveira wrote:
> > Here are some updates for REL7_4.
> > Please apply it before release 7.4.3.
> > http://www.ufgnet.ufg.br/euler/pg_update_7_4_3.tar.gz
> 
> Installed.  Brazil takes the lead...
Thanks. And the docs are in progress too.

-- 
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 4: Don't 'kill -9' the postmaster


[PATCHES] translation updates pt_BR

2004-06-09 Thread Euler Taveira de Oliveira
Hi,

Here are some updates for REL7_4.
Please apply it before release 7.4.3.
http://www.ufgnet.ufg.br/euler/pg_update_7_4_3.tar.gz

Regards,

-- 
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 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [PATCHES] pg_autovacuum integration proof of concept patch

2004-06-08 Thread Euler Taveira de Oliveira
Hi Matthew,

> What have you done specifically?  FYI, I will have the GUC variables 
> done done today or tomorrow, and I have started on the new system tables 
> already.
> 
Almost everything. In a couple of days it will be done, then I send it for
review.


-- 
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] pg_autovacuum integration proof of concept patch

2004-06-07 Thread Euler Taveira de Oliveira
Hi Matthew,

Cool. Last week I just take a look at it and have some ideas.

> I have been working on integrating pg_autovacuum into the backend.  I
> have used Tom's recent work on the bgwriter as an example.  This patch
> accomplishes the following:
> 
> * pg_autovacuum is now started and stopped by the postmaster
> * pg_autovacuum is no longer a stand alone executable
> * pg_autovacuum now uses elog
> 
> I am submitting this patch for review to make sure that I'm headed in
> the right direction, so please give it a cursory glance and tell me if
> you see any glaring problems.
> 
Yep. You're in the right direction.

> I am planning on doing much more in the next few days including:
> * creating pg_autovacuum related guc variables
> * create a new system table for pg_autovacuum settings
> * alter pg_class (or create another new system table) to store
> additional per table pg_autovacuum data which will allow per table
> settings and persistent data
> 
I just made some of this. If you want to exchanges ideas, drop me a line.

I'll try to get what you've done and integrate it with what i've done.


-- 
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 8: explain analyze is your friend


[PATCHES] FAQ translation to pt_BR

2004-06-07 Thread Euler Taveira de Oliveira
Hi,

I just translated the FAQ to brazilian portuguese. There are two
versions: branch 7_4 and HEAD. The text versions are included too.

http://www.ufgnet.ufg.br/euler/faq.tar.gz

Please apply it.

-- 
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 5: Have you checked our extensive FAQ?

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


[PATCHES] small fix in FAQ

2004-06-01 Thread Euler Taveira de Oliveira
Hi,

This is a small fix in FAQ. It just clean up some old comments and change an old
-not-working piece of code.
Please apply it in HEAD and 7.4 branch.

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


faq.diff
Description: Binary data

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


[PATCHES] patch in pipe?

2004-04-22 Thread Euler Taveira de Oliveira
Hi all,

Talking about patches in pipe, I just want to see my patch in PostgreSQL. Nobody 
comments about it. It's about ALTER DATABASE foo OWNER TO bar.
http://archives.postgresql.org/pgsql-patches/2004-03/msg00440.php


Regards,

-- 
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 8: explain analyze is your friend


[PATCHES] alter database foo owner to bar

2004-03-31 Thread Euler Taveira de Oliveira
Hi all,

This patch implement the TODO [ALTER DATABASE foo OWNER TO bar].
It was necessary to touch in grammar and create a new node to make home to the new 
syntax. The command is also supported in ECPG. Doc updates are attached too. Only 
superusers can change the owner of the database. New owners don't need any aditional 
privileges.
Please review it and apply it.

Regards,

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


alter-db.patch
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] change output of \dp

2004-03-11 Thread Euler Taveira de Oliveira
Hi,

> > I just noticed that \dp outputs "Table" to indicate relations
> > (tables, sequences and views) instead of "Relation" or "Name". This
> > patch just correct it, using "Name"  and attaching its "Type".
> 
> Maybe we should think of a more general solution.  For example, there is 
> still not any way to show the privileges of functions and other 
> objects.
> 
> 
I could do it, if nobody objects.

-- 
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 5: Have you checked our extensive FAQ?

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


Re: [PATCHES] change output of \dp

2004-03-11 Thread Euler Taveira de Oliveira
Hi,

I just forgot the documentation patch. It's attached.

Regards,

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



dp_doc.patch
Description: Binary data

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


[PATCHES] change output of \dp

2004-03-10 Thread Euler Taveira de Oliveira
Hi,

I just noticed that \dp outputs "Table" to indicate relations (tables, sequences and 
views) instead of "Relation" or "Name". This patch just correct it, using "Name"  and 
attaching its "Type".

Without the patch:

teste=# \d
 List of relations
 Schema |  Name  |   Type   | Owner
++--+---
 public | ab | sequence | euler
 public | foo| table| euler
 public | foobar | view | euler
 public | teste  | table| euler
(4 rows)

teste=# \dp
  Access privileges for database "teste"
 Schema | Table  |  Access privileges
++-
 public | ab | {euler=a*r*w*d*R*x*t*/euler,teste=ar/euler}
 public | foo| {euler=a*r*w*d*R*x*t*/euler,teste=ar/euler}
 public | foobar |
 public | teste  | {euler=a*r*w*d*R*x*t*/euler,teste=ar/euler}
(4 rows)

And with the patch:

teste=# \dp
  Access privileges for database "teste"
 Schema |  Name  |   Type   |  Access privileges
++--+-
 public | ab | sequence | {euler=a*r*w*d*R*x*t*/euler,teste=ar/euler}
 public | foo| table| {euler=a*r*w*d*R*x*t*/euler,teste=ar/euler}
 public | foobar | view |
 public | teste  | table| {euler=a*r*w*d*R*x*t*/euler,teste=ar/euler}
(4 rows)

Please apply it under HEAD, and if it's convenient, put it under 7_4 Branch.

Regards,

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


dp.patch
Description: Binary data

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

   http://archives.postgresql.org


[PATCHES] update for brazilian portuguese translation

2004-02-05 Thread Euler Taveira de Oliveira
Hi,

I have updated postgres and psql translation. If it's not inconvenience, apply the 
postgres in cvs head too.

This is a big file, so I put it here:
http://www.ufgnet.ufg.br/euler/translation_7_4_pt_BR.tgz

Please apply.

Regards,

-- 
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 7: don't forget to increase your free space map settings


[PATCHES] update for brazilian portuguese translation

2004-01-07 Thread Euler Taveira de Oliveira
Hi,

I have updated the brazilian portuguese translation. I just revised libpq, psql, 
pg_dump, pgscripts, pg_controldata, pg_resetxlog and jdbc. I just finished the 
translation of postgres. Now, postgresql is 100% in pt_BR. :)

This is a big file, so I put it here:
http://www.ufgnet.ufg.br/euler/translation_7_4_pt_BR.tgz

Please apply.

Regards,

-- 
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 8: explain analyze is your friend


[PATCHES] internationalization of initdb

2003-11-19 Thread Euler Taveira de Oliveira
Hi,

I just enable support for internationalization of initdb. I used the same style from 
"scripts". The files need to be put in initdb directory (nls.mk and po/pt_BR.po). The 
patch was made under CVS HEAD.

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


patch_initdb.tgz
Description: Binary data

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


[PATCHES] update for brazilian portuguese translation

2003-11-14 Thread Euler Taveira de Oliveira
Hi,

I have updated the translations of psql and pg_dump. postgres and jdbc are new one. I 
made 2 files: one for CVS HEAD and other one for REL7_4_STABLE.
http://www.ufgnet.ufg.br/euler/patch_pt_BR-cvs.tgz
http://www.ufgnet.ufg.br/euler/patch_pt_BR-rel7_4_stable.tgz

Please apply.

Regards,

-- 
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 6: Have you searched our list archives?

   http://archives.postgresql.org


[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] Translation to Brazilian Portuguese

2003-08-14 Thread Euler Taveira de Oliveira
Hi Peter,


> I'm having difficulties applying the patch.  The PO file for pg_dump is
> giving me merge failures.  I'm not going to apply the rest, so we don't
> get out of sync.  Please send the whole bunch again after you have
> identified and fixed the problem.
> 

Sorry for the incovenience.

> The recommended format for sending translation updates is to send each PO
> file as one attachment, gzipped if you like.  No patches, no directory
> structures, no archives.  If you want to post the files on the web rather
> than sending email, that is okay, but please, no patches, no directory
> structures, just the files (in a tar archive is okay).  Don't bother
> making patches for nls.mk.  Other people might add translations for their
> language at the same time, and you're going to provoke patch failures that
> way.  Just say which files are new.  Thanks.
> 

I had known the rules. :))

Now I put the files in my machine because it's too large (84K). The file *.po are new 
ones and *_patch are the updates against the REL_7_4_BETA1 branch.

<http://www2.ufgnet.ufg.br/euler/patch_pt-br.tar.gz>

-- 
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 4: Don't 'kill -9' the postmaster


[PATCHES] Translation to Brazilian Portuguese

2003-08-14 Thread Euler Taveira de Oliveira
Hi,

I updated the translations of libpq, pg_controldata, pg_dump and pg_resetxlog and 
translated the psql, scripts and backend. The backend is incomplete yet, but I'm 
working on it. I'm planning to translate the FAQ too. The patch is made under 7.4beta1.
Just get the file and gunzip it in root directory and then apply the patch.

I put the archives in my machine because the patch has 86K.
<http://www2.ufgnet.ufg.br/euler/patch_pt-br.tar.gz>

Best Regards,
Euler Taveira de Oliveira
euler (at) ufgnet.ufg.br

-- 
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
   - Indira Gandhi

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