Skip site navigation (1) Skip section navigation (2)

Re: COPY when 'filename' is a directory

From: Brent Verner <brent(at)rcfile(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,Douglas Trainor <trainor(at)uic(dot)edu>, pgsql-bugs(at)postgresql(dot)org,pgsql-patches(at)postgresql(dot)org
Subject: Re: COPY when 'filename' is a directory
Date: 2002-02-24 01:56:22
Message-ID: 20020224015622.GA22891@rcfile.org (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-patches
[2002-02-23 20:27] Tom Lane said:
| Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
| >   		{
| > +       struct stat st;
| >   			fp = AllocateFile(filename, PG_BINARY_R);

| > +         fclose(fp);
| 
| This coding is WRONG.  You do not use fclose() to release a file
| opened with AllocateFile.

  s/fclose/FreeFile/

hiding in shame,
  brent

-- 
"Develop your talent, man, and leave the world something. Records are 
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing."  -- Duane Allman

In response to

Responses

pgsql-bugs by date

Next:From: Brent VernerDate: 2002-02-24 01:59:42
Subject: Re: COPY when 'filename' is a directory
Previous:From: Tom LaneDate: 2002-02-24 01:27:47
Subject: Re: COPY when 'filename' is a directory

pgsql-patches by date

Next:From: Brent VernerDate: 2002-02-24 01:59:42
Subject: Re: COPY when 'filename' is a directory
Previous:From: Tom LaneDate: 2002-02-24 01:27:47
Subject: Re: COPY when 'filename' is a directory

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group