pg.ddx.io  pgsql-ports@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Buffered file creation and usage
2+ messages / 2 participants
[nested] [flat]

* Buffered file creation and usage
@ 2006-03-27 13:27  VOGLOZIN W. Amenel <amenel.voglozin@univ-nantes.fr>
  0 siblings, 1 reply; 2+ messages in thread

From: VOGLOZIN W. Amenel @ 2006-03-27 13:27 UTC (permalink / raw)
  To: pgsql-ports

Hi,
I'm implementing a module in pgsql on the server side (Win32 version, but  
it's not platform-specific). I need access to a specific file whose name I  
know (of course!). I'm trying to use a buffered access though the BufFile  
type (header path is 'include/storage/buffile.h').
The problem is that there is only one constructor for data type BufFile  
(namely 'extern BufFile *BufFileCreateTemp(bool interXact);'). The other  
possible constructors I found were in buffile.c but the only one that  
allows me to specify a file is protected by an  'ifdef NOT_USED'.

My questions are:
1- is it possible to have a buffered access to a file initially external  
to the database ? If yes, how can I do that ?
2- what is the meaning of the NOT_USED define ? A text search showed it is  
used in more than 40 files.
Thanks.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Buffered file creation and usage
@ 2006-03-27 15:58  Tom Lane <tgl@sss.pgh.pa.us>
  parent: VOGLOZIN W. Amenel <amenel.voglozin@univ-nantes.fr>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2006-03-27 15:58 UTC (permalink / raw)
  To: VOGLOZIN W. Amenel <amenel.voglozin@univ-nantes.fr>; +Cc: pgsql-ports

"VOGLOZIN W. Amenel" <amenel.voglozin@univ-nantes.fr> writes:
> I'm implementing a module in pgsql on the server side (Win32 version, but  
> it's not platform-specific). I need access to a specific file whose name I  
> know (of course!). I'm trying to use a buffered access though the BufFile  
> type (header path is 'include/storage/buffile.h').

Why do you think this is a good idea?  The services provided by
buffile.c aren't really useful for anything except PG temporary files.
AFAICS you'd be better off using fd.c directly.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-03-27 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-03-27 13:27 Buffered file creation and usage VOGLOZIN W. Amenel <amenel.voglozin@univ-nantes.fr>
2006-03-27 15:58 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox