Re: [PATCHES] Harmless space allocation typo

2005-03-06 Thread Neil Conway
Heikki Linnakangas wrote:
Here's a tiny fix for a harmless typo in catalog.c
Applied, thanks.
-Neil
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
  http://www.postgresql.org/docs/faq


[PATCHES] Harmless space allocation typo

2005-03-05 Thread Heikki Linnakangas
Here's a tiny fix for a harmless typo in catalog.c:
Too much space is allocated for tablespace file path, I guess the 
directory name used to be pg_tablespaces instead of pg_tblspc at some
point.

- HeikkiIndex: catalog.c
===
RCS file: /projects/cvsroot/pgsql/src/backend/catalog/catalog.c,v
retrieving revision 1.57
diff -c -r1.57 catalog.c
*** catalog.c   31 Dec 2004 21:59:38 -  1.57
--- catalog.c   5 Mar 2005 22:12:21 -
***
*** 58,64 
else
{
/* All other tablespaces are accessed via symlinks */
!   pathlen = strlen(DataDir) + 16 + OIDCHARS + 1 + OIDCHARS + 1 + 
OIDCHARS + 1;
path = (char *) palloc(pathlen);
snprintf(path, pathlen, %s/pg_tblspc/%u/%u/%u,
 DataDir, rnode.spcNode, rnode.dbNode, 
rnode.relNode);
--- 58,64 
else
{
/* All other tablespaces are accessed via symlinks */
!   pathlen = strlen(DataDir) + 11 + OIDCHARS + 1 + OIDCHARS + 1 + 
OIDCHARS + 1;
path = (char *) palloc(pathlen);
snprintf(path, pathlen, %s/pg_tblspc/%u/%u/%u,
 DataDir, rnode.spcNode, rnode.dbNode, 
rnode.relNode);
***
*** 99,105 
else
{
/* All other tablespaces are accessed via symlinks */
!   pathlen = strlen(DataDir) + 16 + OIDCHARS + 1 + OIDCHARS + 1;
path = (char *) palloc(pathlen);
snprintf(path, pathlen, %s/pg_tblspc/%u/%u,
 DataDir, spcNode, dbNode);
--- 99,105 
else
{
/* All other tablespaces are accessed via symlinks */
!   pathlen = strlen(DataDir) + 11 + OIDCHARS + 1 + OIDCHARS + 1;
path = (char *) palloc(pathlen);
snprintf(path, pathlen, %s/pg_tblspc/%u/%u,
 DataDir, spcNode, dbNode);

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