Re: [PATCHES] [BUGS] CC Date format code defaults to current centry
Karel Zak [EMAIL PROTECTED] writes: I think it's very special case when you define YY and CC and code should detects it and counts year as (CC-1)*100+YY. The right answers: ... The patch (with docs changes) is in the attachment. Applied to HEAD and 8.0. regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] Fix that deals with unusable custom variables.
Thomas Hallgren [EMAIL PROTECTED] writes: This is a bit embarrassing but the patch I submitted that enables custom variable classes (8-10 months ago) was somewhat incomplete. The DefineCustomIntVariable and DefineCustomRealVariable functions doesn't have parameters that make it possible to set the min and max values of the variables. Consequently, custom variables of int and real type are completely useless. This patch adds the additional parameters minValue and maxValue to those functions. No one but me have used this so far (or someone would have noticed) so I think it would be safe to backport this for 8.0.2. Applied to HEAD and 8.0. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [PATCHES] Makefile breakage
Tom Lane wrote: Bruce Momjian pgman@candle.pha.pa.us writes: Tom Lane wrote: I think you should leave the $(libpq) macro alone and add a $(libpgport) macro ... and yes, you will have to go around and modify the client program Makefiles individually. How is this? It creates a new $(libpq_only) for library usage. ecpglib/Makefile is the only place I saw that can use it. I think you are creating long-term confusion in order to save yourself a little bit of editing work. I don't object to having a combined macro but it shouldn't be called $(libpq). Maybe $(libpq_plus_support) or something like that ... or even libpq_plus_libpgport ... Also think about whether the hack in Makefile.global to add PTHREAD_LIBS to $(libpq) ought to add them to $(libpq_plus_support) instead. I'm not sure about that one ... it might be that you cannot link libpq successfully without PTHREAD_LIBS in the cases where the hack fires. OK, here is a new patch. I called it 'libpq_pgport'. I restructured the code so the threading is added first, and uses just $libpq so it includes any thread additions. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 Index: contrib/dbase/Makefile === RCS file: /cvsroot/pgsql/contrib/dbase/Makefile,v retrieving revision 1.6 diff -c -c -r1.6 Makefile *** contrib/dbase/Makefile 20 Aug 2004 20:13:02 - 1.6 --- contrib/dbase/Makefile 25 Mar 2005 17:59:39 - *** *** 3,9 PROGRAM = dbf2pg OBJS = dbf.o dbf2pg.o endian.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq) # Uncomment this to provide charset translation #PG_CPPFLAGS += -DHAVE_ICONV_H --- 3,9 PROGRAM = dbf2pg OBJS = dbf.o dbf2pg.o endian.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq_pgport) # Uncomment this to provide charset translation #PG_CPPFLAGS += -DHAVE_ICONV_H Index: contrib/findoidjoins/Makefile === RCS file: /cvsroot/pgsql/contrib/findoidjoins/Makefile,v retrieving revision 1.16 diff -c -c -r1.16 Makefile *** contrib/findoidjoins/Makefile 20 Aug 2004 20:13:03 - 1.16 --- contrib/findoidjoins/Makefile 25 Mar 2005 17:59:39 - *** *** 4,10 OBJS = findoidjoins.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq) SCRIPTS = make_oidjoins_check DOCS = README.findoidjoins --- 4,10 OBJS = findoidjoins.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq_pgport) SCRIPTS = make_oidjoins_check DOCS = README.findoidjoins Index: contrib/oid2name/Makefile === RCS file: /cvsroot/pgsql/contrib/oid2name/Makefile,v retrieving revision 1.6 diff -c -c -r1.6 Makefile *** contrib/oid2name/Makefile 20 Aug 2004 20:13:05 - 1.6 --- contrib/oid2name/Makefile 25 Mar 2005 17:59:39 - *** *** 4,10 OBJS = oid2name.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq) DOCS = README.oid2name --- 4,10 OBJS = oid2name.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq_pgport) DOCS = README.oid2name Index: contrib/pg_autovacuum/Makefile === RCS file: /cvsroot/pgsql/contrib/pg_autovacuum/Makefile,v retrieving revision 1.3 diff -c -c -r1.3 Makefile *** contrib/pg_autovacuum/Makefile 16 Oct 2004 21:50:02 - 1.3 --- contrib/pg_autovacuum/Makefile 25 Mar 2005 17:59:39 - *** *** 2,8 OBJS = pg_autovacuum.o dllist.o PG_CPPFLAGS = -I$(libpq_srcdir) -DFRONTEND ! PG_LIBS = $(libpq) DOCS = README.pg_autovacuum --- 2,8 OBJS = pg_autovacuum.o dllist.o PG_CPPFLAGS = -I$(libpq_srcdir) -DFRONTEND ! PG_LIBS = $(libpq_pgport) DOCS = README.pg_autovacuum Index: contrib/pg_dumplo/Makefile === RCS file: /cvsroot/pgsql/contrib/pg_dumplo/Makefile,v retrieving revision 1.13 diff -c -c -r1.13 Makefile *** contrib/pg_dumplo/Makefile 20 Aug 2004 20:13:05 - 1.13 --- contrib/pg_dumplo/Makefile 25 Mar 2005 17:59:39 - *** *** 4,10 OBJS = main.o lo_export.o lo_import.o utils.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq) DOCS = README.pg_dumplo --- 4,10 OBJS = main.o lo_export.o lo_import.o utils.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq_pgport) DOCS = README.pg_dumplo Index: contrib/pgbench/Makefile === RCS file: /cvsroot/pgsql/contrib/pgbench/Makefile,v retrieving revision 1.12 diff -c -c -r1.12
Re: [PATCHES] Makefile breakage
Bruce Momjian pgman@candle.pha.pa.us writes: OK, here is a new patch. I called it 'libpq_pgport'. Looks alright to me now. Are you going to get this into 8.0.2beta? regards, tom lane ---(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] Makefile breakage
Bruce Momjian wrote: Tom Lane wrote: Bruce Momjian pgman@candle.pha.pa.us writes: OK, here is a new patch. I called it 'libpq_pgport'. Looks alright to me now. Are you going to get this into 8.0.2beta? Yea, I guess. It really just has to be in our final release before 8.1. Would someone else eyeball it before I apply it, or should I just keep it for post 8.0.2? I just remembered 8.0.2 is going to get more testing than a typical 8.0.X release, so I am applying now. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] Makefile breakage
Tom Lane wrote: Bruce Momjian pgman@candle.pha.pa.us writes: OK, here is a new patch. I called it 'libpq_pgport'. Looks alright to me now. Are you going to get this into 8.0.2beta? Yea, I guess. It really just has to be in our final release before 8.1. Would someone else eyeball it before I apply it, or should I just keep it for post 8.0.2? -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] Faster install-sh in C
Tom Lane wrote: Bruce Momjian pgman@candle.pha.pa.us writes: OK, what is 'install' doing for us that 'cp' and 'chmod' would not already do? Quite a lot of things, such as coping with busy target files --- not too important for headers, but very important for executables and shlibs. We might be able to get away with this for just the headers, though, and that's certainly the bulk of the install work now. Here is my next version of the patch that uses 'cp' and 'chmod' to install multiple header files rather than 'install'. I moved the file modes into variables so any changes are propogated to src/include/Makefile. This is 20 times faster than what we have now, 8 seconds vs 0.40 seconds. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 Index: src/Makefile.global.in === RCS file: /cvsroot/pgsql/src/Makefile.global.in,v retrieving revision 1.212 diff -c -c -r1.212 Makefile.global.in *** src/Makefile.global.in 25 Mar 2005 18:17:12 - 1.212 --- src/Makefile.global.in 25 Mar 2005 22:58:33 - *** *** 232,240 INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c INSTALL_PROGRAM = $(INSTALL_PROGRAM_ENV) $(INSTALL) $(INSTALL_STRIP_FLAG) ! INSTALL_SCRIPT= $(INSTALL) -m 755 ! INSTALL_DATA = $(INSTALL) -m 644 INSTALL_STLIB = $(INSTALL_STLIB_ENV) $(INSTALL_DATA) $(INSTALL_STRIP_FLAG) INSTALL_SHLIB = $(INSTALL_SHLIB_ENV) $(INSTALL) $(INSTALL_SHLIB_OPTS) $(INSTALL_STRIP_FLAG) # Override in Makefile.port if necessary --- 232,242 INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c + INSTALL_SCRIPT_MODE = 755 + INSTALL_DATA_MODE = 644 INSTALL_PROGRAM = $(INSTALL_PROGRAM_ENV) $(INSTALL) $(INSTALL_STRIP_FLAG) ! INSTALL_SCRIPT= $(INSTALL) -m $(INSTALL_SCRIPT_MODE) ! INSTALL_DATA = $(INSTALL) -m $(INSTALL_DATA_MODE) INSTALL_STLIB = $(INSTALL_STLIB_ENV) $(INSTALL_DATA) $(INSTALL_STRIP_FLAG) INSTALL_SHLIB = $(INSTALL_SHLIB_ENV) $(INSTALL) $(INSTALL_SHLIB_OPTS) $(INSTALL_STRIP_FLAG) # Override in Makefile.port if necessary Index: src/include/Makefile === RCS file: /cvsroot/pgsql/src/include/Makefile,v retrieving revision 1.19 diff -c -c -r1.19 Makefile *** src/include/Makefile6 Jan 2005 21:00:24 - 1.19 --- src/include/Makefile25 Mar 2005 22:58:37 - *** *** 37,49 # These headers are needed for server-side development $(INSTALL_DATA) pg_config.h$(DESTDIR)$(includedir_server) $(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir_server) ! for file in $(srcdir)/*.h; do \ ! $(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/`basename $$file` || exit; \ ! done for dir in $(SUBDIRS); do \ ! for file in $(srcdir)/$$dir/*.h; do \ ! $(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/$$dir/`basename $$file` || exit; \ ! done \ done installdirs: --- 37,48 # These headers are needed for server-side development $(INSTALL_DATA) pg_config.h$(DESTDIR)$(includedir_server) $(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir_server) ! # We don't use INSTALL_DATA for performance reasons --- there are a lot of files ! cp $(srcdir)/*.h $(DESTDIR)$(includedir_server)/ || exit; \ ! chmod $(INSTALL_DATA_MODE) $(DESTDIR)$(includedir_server)/*.h || exit; \ for dir in $(SUBDIRS); do \ ! cp $(srcdir)/$$dir/*.h $(DESTDIR)$(includedir_server)/$$dir/ || exit; \ ! chmod $(INSTALL_DATA_MODE) $(DESTDIR)$(includedir_server)/$$dir/*.h || exit; \ done installdirs: ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [PATCHES] Faster install-sh in C
Bruce Momjian pgman@candle.pha.pa.us writes: Tom Lane wrote: We might be able to get away with this for just the headers, though, and that's certainly the bulk of the install work now. Here is my next version of the patch that uses 'cp' and 'chmod' to install multiple header files rather than 'install'. I moved the file modes into variables so any changes are propogated to src/include/Makefile. This is 20 times faster than what we have now, 8 seconds vs 0.40 seconds. I like it. Given that we are installing into directories we'd have just created ourselves, which should have no extraneous files in them, a lot of the objections one might raise go away. Why don't you go ahead and apply that to HEAD for the time being, even if we end up replacing it later? Might as well start saving developers' time immediately. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [PATCHES] Faster install-sh in C
Tom Lane wrote: Bruce Momjian pgman@candle.pha.pa.us writes: Tom Lane wrote: We might be able to get away with this for just the headers, though, and that's certainly the bulk of the install work now. Here is my next version of the patch that uses 'cp' and 'chmod' to install multiple header files rather than 'install'. I moved the file modes into variables so any changes are propogated to src/include/Makefile. This is 20 times faster than what we have now, 8 seconds vs 0.40 seconds. I like it. Given that we are installing into directories we'd have just created ourselves, which should have no extraneous files in them, a lot of the objections one might raise go away. Why don't you go ahead and apply that to HEAD for the time being, even if we end up replacing it later? Might as well start saving developers' time immediately. Done. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(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