Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAgzo-0000tD-Qd for pgsql-docs@arkaria.postgresql.org; Thu, 11 Oct 2018 19:51:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gAgzn-0007Gg-1M for pgsql-docs@arkaria.postgresql.org; Thu, 11 Oct 2018 19:51:43 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAgzm-0007GY-Mb for pgsql-docs@lists.postgresql.org; Thu, 11 Oct 2018 19:51:42 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gAgzj-0004gV-VU for pgsql-docs@lists.postgresql.org; Thu, 11 Oct 2018 19:51:41 +0000 Received: by mail-qk1-x741.google.com with SMTP id a13-v6so6261965qkc.7 for ; Thu, 11 Oct 2018 12:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9HJtMQ3y9n81w5tByiwEy4cq8LRi5Z/CmfLh4gxKBzA=; b=Q9VqnpAg6VrEziNPGolxTnnE3UaCxKcbtwQonHbCgh50q7yZYxV54js7Tc7Zanwf4b fCvZmY7jJiwfVgN4zK7p86WJiW6X6OVkrIYUrcsQUhVY6bnMzRknQEIOL11fTdzIkOvq MHrPgWC32UoTRwjYzjqf8Kt1edgtBWEyT3AMmaztE3AnIiddGzZCwQE1k1qnmmOFVsGA h9po459sT0+pbxGvpLuZ/LUhk5CNEHFM/rO9hUwqD8ys/aDBbw99uc26whLYdunDowm/ GV0uA9m2aLGuSlwzkVBrGTrBlJIDzAg5SjV7Yb7/KUbuXwSnNwFhHXA88tY6VTJg4Oxz vFbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9HJtMQ3y9n81w5tByiwEy4cq8LRi5Z/CmfLh4gxKBzA=; b=TYu1D/n4XAamcZl9gbk7i7/64JVaD1E9IHpOLpiK9RUdw5WblV2zGTleU+a2nlNYoC pDodLEwZUViiNy8Ykfs3iyNKcM4mgPXGS17AqJ7AW+4sRhij7bM4XI3UVoBZrkCXb3dk CucwRnCJVD7C/XWq0lpaF5rC1HIXHHI/xSINGyEChSSb0u4hE7QpHTyQUg8zWt/wTMUx iWELZQpJdprPUIlSIUWw3JSEarQ13EC4ocRWYHTtC71OEaEM9YWPTnbpelvNYL8Fhnzy mTrBwyA1XPY6bjopPwA96vbdnmZOrSwYcEEuNrwI8OHnpeeV/UYzHxQPv2lGaSw3Fwna 19WA== X-Gm-Message-State: ABuFfoitEvJT/9Etjra/1/DGEXHG9tlFBjDN+Dh+dacSLFBrzNFNg17b V6lWECcXVhSO0J7Wp9IJsLeF6pEEH5PxRhT5tgQ= X-Google-Smtp-Source: ACcGV61zd68rG0r5LmaUr10PdnzthHMJfLGTrT8dN4zvW58XypolZWwj0H9k0efe6u3k0Iw5kjS6Lj1xRQqdLpAngGA= X-Received: by 2002:a37:c853:: with SMTP id c80-v6mr2875286qkj.54.1539287499047; Thu, 11 Oct 2018 12:51:39 -0700 (PDT) MIME-Version: 1.0 References: <153653649616.23138.1453197444453120513@wrigleys.postgresql.org> <20181010195959.GB7806@momjian.us> <20181011185136.GD7807@momjian.us> In-Reply-To: From: "David G. Johnston" Date: Thu, 11 Oct 2018 12:51:27 -0700 Message-ID: Subject: Re: please inform data_directory To: Peter Krauss Cc: Bruce Momjian , pgsql-docs@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000009686e00577f94c4d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000009686e00577f94c4d Content-Type: text/plain; charset="UTF-8" On Thu, Oct 11, 2018 at 12:43 PM Peter Krauss wrote: > > The page https://www.postgresql.org/docs/10/static/functions-admin.html > need this information, is like a "pg_read_file Guide". > Applies to all: "The functions shown in Table 9.88 provide native access to files on the machine hosting the server. Only files within the database cluster directory and the log_directory can be accessed. Use a relative path for files in the cluster directory, and a path matching the log_directory configuration setting for log files. Use of these functions is restricted to superusers except where stated otherwise." Applies to pg_read_file: "pg_read_file returns part of a text file, starting at the given offset, returning at most length bytes (less if the end of file is reached first). If offset is negative, it is relative to the end of the file. If offset and length are omitted, the entire file is returned. The bytes read from the file are interpreted as a string in the server encoding; an error is thrown if they are not valid in that encoding." There is nothing unclear there and by the time one gets to this part of the documentation its reasonably assumed they understand "data directory"; being verbose on that point is not an improvement. For the rare person that gets confused these lists are available to obtain clarity. But aside from the one comment I've already made - and this is very minor in nature - I'm not seeing anything obvious short-comings here. David J. --0000000000009686e00577f94c4d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Oct 11, 2018 at 12:43 PM Peter Kr= auss <ppkrauss@gmail.com> w= rote:
need this info= rmation, is like a=C2=A0 "pg_read_file Guide".
<= /blockquote>

Applies to all:

&qu= ot;The functions shown in Table 9.88 provide native access to files on the = machine hosting the server. Only files within the database cluster director= y and the log_directory can be accessed. Use a relative path for files in t= he cluster directory, and a path matching the log_directory configuration s= etting for log files. Use of these functions is restricted to superusers ex= cept where stated otherwise."

Applies to pg_read= _file:

"pg_read_file returns part of a text file, star= ting at the given offset, returning at most length bytes (less if the end o= f file is reached first). If offset is negative, it is relative to the end = of the file. If offset and length are omitted, the entire file is returned.= The bytes read from the file are interpreted as a string in the server enc= oding; an error is thrown if they are not valid in that encoding."

There is nothing unclear there and by the time on= e gets to this part of the documentation its reasonably assumed they unders= tand "data directory"; being verbose on that point is not an impr= ovement.=C2=A0 For the rare person that gets confused these lists are avail= able to obtain clarity.=C2=A0 But aside from the one comment I've alrea= dy made - and this is very minor in nature - I'm not seeing anything ob= vious short-comings here.

David J.

<= /div>
--0000000000009686e00577f94c4d--