On Wed, 2002-05-29 at 14:49, Marcia Abade wrote:
> Sorry,
>
> Im very new user of PostgreSQL and I need to apply a patch whitten in
> C. Im looking for the information "how to apply patches in PostgreSQL"
> and it is not part of the manual.
> Could you help me? And by suggestion, could you include this information
> in the Administration manual?...
Applying a patch is not a task that is in any way specific to
PostgreSQL, so it doesn't, I think, belong in PostgreSQL's manual.
A patch is produced by using "diff -c" or "diff -u"; it contains file
pathnames like this:
--- postgresql-7.2.1.orig/contrib/rserv/Makefile
+++ postgresql-7.2.1/contrib/rserv/Makefile
@@ -27,6 +27,7 @@
$(PERLS) $(TCLS) $(SCRIPTS): %: %.in
sed -e 's,@MODULE_FILENAME@,$$libdir/$(NAME),g' \
-e 's:@SQLDIR@:$(datadir)/contrib:g' \
+ -e 's:# -\*- perl -\*-:#! /usr/bin/perl -w:' \
-e 's:@BINDIR@:$(bindir):g' \
-e 's:@LIBDIR@:$(datadir)/contrib:g' $< >$@
chmod a+x $@
--- postgresql-7.2.1.orig/src/backend/libpq/pg_hba.conf.sample
+++ postgresql-7.2.1/src/backend/libpq/pg_hba.conf.sample
@@ -224,22 +224,21 @@
# See $PGDATA/pg_ident.conf for more information on Ident maps.
#
...[and so on]...
The patch is applied with the command "patch" - check its man page.
If your current directory is postgresql-7.2.1, you will apply the above
patch with the command "patch -p1 </path/to/the/patch/file"; "-p1" tells
patch to drop one path element from the pathname of the files to be
patched; in this example, that would change the first path to
"contrib/rserv/Makefile". If there is no path element to drop, use
"-p0".
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
"If any of you lack wisdom, let him ask of God, that
giveth to all men liberally without finding fault, and
it will be given to him." James 1:5