[PATCHES] Tiny patch on print.c of psql
Hi all, This is my 1st patch ever in C :-)... I was just borried by a bad psql \H html output of an EXPLAIN because it didnt respected spaces sent from backend like: - Sort - Sort I just remarked in this print.c the case of a white space wasnt handled in the function escaping special caracters to HTML codes, so I added it replacing a space by special html nbsp; ( n b s p). So we'll have now: -nbsp;Sort nbsp;nbsp;-nbsp;Sort ... in the html generated (see example at http://www.pack-solutions.net/~jpargudo/explain.html) Then, every single space in the html source is replaced by this. The source looks ugly, yes, I will look to *only replacing starting spaces* of each row of the EXPLAIN, thats will be my 1st patch ever, version 2 :) So I post this patch only FYI.. I had much fun playing with C a bit :-) (yes, I dont code C, just a bit of Perl and Python). Cheers! Thanks again for such a powerfull release. -- Jean-Paul Argudo www.PostgreSQLFr.org --- postgresql-8.0.0/src/bin/psql/print.c 2005-01-01 06:43:08.0 +0100 +++ postgresql-8.0.0-patch/src/bin/psql/print.c 2005-01-20 21:54:56.0 +0100 @@ -617,6 +617,9 @@ case '\'': fputs(apos;, fout); break; + case ' ': +fputs(nbsp;, fout); +break; default: fputc(*p, fout); } ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [PATCHES] [pgsql-hackers-win32] pg_autovacuum fails to start - 8.0 Release
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Page Sent: 20 January 2005 15:29 To: Harald Massa; [EMAIL PROTECTED] Cc: Patches (PostgreSQL) Subject: Re: [PATCHES] [pgsql-hackers-win32] pg_autovacuum fails to start - 8.0 Release It appears I didn't read the docs properly when I write that bit - the dependencies parameter passed to CreateService() is supposed to be double-null terminated - a subtle point I missed :-( The attached patch fixes this. Harald - I can email an updated .exe if you want to test, otherwise, you should be able to use the current version if you cleanup the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pg_autova cuum\DependOnService registry key. Sorry - the attached patch supercedes the original. It also directs errors when installing/removing the windows service to stderr, rather than other logs. Regards, Dave. pg_autovacuum.c.diff Description: pg_autovacuum.c.diff ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [PATCHES] [pgsql-hackers-win32] pg_autovacuum fails to start - 8.0 Release
Dave, [access denied] I see that message if the service user cannot access the executable - in my case, when I tried running it from my development directory, which the service user has no access to. When I moved the file to C:\Program Files\PostgreSQL\8.0\bin, it worked perfectly. Hm. I put it there, too. But I copied it from the desktop (where I downloaded and unzipped it) And... checking the security-setting, it is exactly what your message suggests: postgres does not have reading rights. It reports the failure in the logfile which becomes the log target. In the attached version, I've redirected all install/remove errors to stderr (and removed the debug print). I think that is a good idea; not that redirecting to log would be wrong, but it bytes. (Same problem with some applications of myself :)) Will try your patched patch, thanks agaim, Harald ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [PATCHES] [pgsql-hackers-win32] 300 seconds in less than 1 second with pg_autovacuum
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Page Sent: 21 January 2005 13:20 To: Harald Massa; [EMAIL PROTECTED] Subject: Re: [pgsql-hackers-win32] 300 seconds in less than 1 second with pg_autovacuum -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Harald Massa Sent: 21 January 2005 12:55 To: [EMAIL PROTECTED] Subject: [pgsql-hackers-win32] 300 seconds in less than 1 second with pg_autovacuum What is going wrong? I did not fiddle with the Sleep-Period, just left it on default. Hmm: Windows: VOID Sleep(DWORD dwMilliseconds); Unix: unsigned int sleep(unsigned int seconds); D'oh! Patch coming up Patch attached... Harald, do you want another exe to try? Regards, Dave pg_autovacuum.c.diff Description: pg_autovacuum.c.diff ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] [pgsql-hackers-win32] 300 seconds in less than 1 second with pg_autovacuum
Dave Page said: Hmm: Windows: VOID Sleep(DWORD dwMilliseconds); Unix: unsigned int sleep(unsigned int seconds); D'oh! Patch coming up We should not be using either of these, should we? pg_usleep() is platform independent. cheers andrew ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [PATCHES] regression: pass with no default WITH OIDS
Neil Conway wrote: This patch updates the regression tests to allow make installcheck to pass if default_with_oids is set to false. I took the approach of explicitly adding WITH OIDS to the CREATE TABLEs where necessary, rather than tweaking the default_with_oids GUC var. Applied to HEAD and REL8_0_STABLE. -Neil ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster