On Thu, Apr 29, 2004 at 11:21:53PM +0100, Simon Riggs wrote:

> ...my patch building experience is less than some might
> expect so there are various possible annoyances here. I am on hand to
> help and to learn by my mistakes.

I see you attached one patch for every file ... this works, but is error
prone.  May I suggest another approach:

1. get CVSup if you can.  I have Linux, so I got the ezm3 package and
the CVSup package.  Compile/install ezm3 (it's a Modula-3 compiler)
first and then CVSup.  Google for them, I don't have URLs.

2. get the whole Postgres repository using CVSup with this config file:
*default host=cvsup.postgresql.org
*default compress
*default release=cvs
*default delete use-rel-suffix
# *default tag=.
# base directory where CVSup will store its 'bookmarks' file(s)
*default base=/home/alvherre/cvs

# prefix directory where CVSup will store the actual distribution(s)
*default prefix=/home/alvherre/cvs

# complete distribution

This will create a "cvsroot".  Adjust the path, obviously.  Note that
case matters because I have a "cvs" directory with the cvsroot, and a
"CVS" directory for the checkouts.  This may be a stupid idea but it is
how I did it some time ago :-)

3. Checkout a couple of trees
cvs -d /home/alvherre/cvs co pgsql

I have several pgsql trees:


this is the pristine CVS tip.

My first modification in

second in
etc, you get the idea.  (I have a "74_rel" and "73_rel" too, just in

Then I created a "build" tree, in /home/alvherre/CVS/pgsql/build.  So
each time I want to compile, I create a
/home/alvherre/CVS/pgsql/build/00orig, cd to it, and then do
../../source/00orig/configure --enable-debug [etc] 

4. To generate a patch, just do
cd /home/alvherre/CVS/pgsql/01xact
cvs -q diff

Note that sometimes I do things incrementally, so I do "incremental
diffs" by commands like
cd /home/alvherre/CVS/pgsql/source
diff -cr --exclude-from=ignore-diff 01xact 02blahblah

The ignore-diff file is there because some files are built on the source
tree and generate a lot of irrelevant differences.  It contains


So, by this time you are wondering why do I use a number as the start of
the tree name.  Well, this is because I have a script which allows me to
- build (configure, make)
- install (make install)
- initdb
- run a server
- run a psql client
- run a "make check" against a running server

And I may want to do any combination of the above with any combination
of the pgsql trees I have, simultaneously.  So I picked a random number
as "base", and the scripts takes the sum of this number and the number
at the start of tree name, and uses it as the port (--with-pgport).  So
I can run all servers and clients, with no conflict.

If there is any interest I can post the script too.  It's somewhat ugly
but it has worked for me.

Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La virtud es el justo medio entre dos defectos" (Aristóteles)

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

Reply via email to