From 022903f22e54cbc78b4acc1ef54f73d19a051630 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 18 Aug 1997 02:15:04 +0000 Subject: Reduce open() calls. Replace fopen() calls with calls to fd.c functions. --- src/backend/utils/adt/arrayfuncs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/backend/utils/adt/arrayfuncs.c') diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index 71acc8e998a..98849b22c91 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.13 1997/08/12 22:54:24 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.14 1997/08/18 02:14:54 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -23,7 +23,7 @@ #include "utils/syscache.h" #include "utils/memutils.h" -#include "storage/fd.h" /* for SEEK_ */ +#include "storage/fd.h" #include "fmgr.h" #include "utils/array.h" @@ -463,11 +463,12 @@ _ReadLOArray(char *str, if ( accessfile ) { FILE *afd; - if ((afd = fopen (accessfile, "r")) == NULL) + if ((afd = AllocateFile(accessfile, "r")) == NULL) elog(WARN, "unable to open access pattern file"); *chunkFlag = true; retStr = _ChunkArray(*fd, afd, ndim, dim, baseSize, nbytes, chunkfile); + FreeFile(afd); } return(retStr); } -- cgit v1.2.3