Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkWdt-0001np-KI for pgsql-general@arkaria.postgresql.org; Fri, 29 Apr 2022 19:51:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nkWds-0005wH-6j for pgsql-general@arkaria.postgresql.org; Fri, 29 Apr 2022 19:51:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkWdr-0005su-Q2 for pgsql-general@lists.postgresql.org; Fri, 29 Apr 2022 19:51:03 +0000 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nkWdl-00032j-9F for pgsql-general@lists.postgresql.org; Fri, 29 Apr 2022 19:51:02 +0000 Received: by mail-qk1-x72e.google.com with SMTP id s4so6736453qkh.0 for ; Fri, 29 Apr 2022 12:50:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to; bh=pbDXYqwoDi4pkFQ2fvlipX+bus3E9S/EYt6DQ1sd1bc=; b=CUposvuYCw07fsyEbdiut/Cf8nXCzZCmG2POMenGGPfsNTWDGLWQHNZMTzt6Xc89c6 JZCDK3DO0HBucjjcCLeO79+o0rFk3CQTIdO0KgF+NpcSvX+NkUGt6kC+gW4fSInVQoFQ xNWEAcASoiODjXvrCJxftdaLxHenMSjQ2A+ITyfCTgroiiTVeiMNSHYrn9aGFSDRd7Jc RhI5NdR0aegYgUY3VOjSvoB3zCPgEt8YJKb5T7vrBC1sdxQEx/Ht7/nAWqS0VemVERBf 24yORwAzXWp193hxpMhE0dTp/ru+LvLdLzM/tBL4ruhMjA9AZiMbxpt9RKIhwSrmqirQ eBNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to; bh=pbDXYqwoDi4pkFQ2fvlipX+bus3E9S/EYt6DQ1sd1bc=; b=mlV2Aw+XXcBbxRYRry47olnT8+GuvkODKTBEe/Xn11tQI52ukEQBl5BsbbEoDKpO4E DAj+iPpeaz/VtQI7+za4bcHK+cE1lfBycAIqPSzVe798wLaK+I7xeRW49N7GQ4RX8Ery R+nAOyuHh8qI1a+ZKZOSHJyZKS6PF83XrnffOl5r943o6iGy35Z3nhiKO8a5+1PlXJs2 0u6zXYR49QLxexDBM2aBYWejjrfWppEV4EiHC6IbDCFPwCG5Qys/MTqYOV+B0Sj+UJpQ F9808vrsBPgDFjosswbr1ecU+0GOic0kG8kSNh14RljvsglQMCX8b64wDNCzFctcNfMM 1Rpw== X-Gm-Message-State: AOAM532epSzBlpE/yPTmf7l06KqOltzNBL6Wl/BkX8Y+DDy86fnOirMc Q+HHq3eW0ba5/W0U2BGHI3b9r5nfmBg= X-Google-Smtp-Source: ABdhPJx4iqaedA101JXlsfmwwcgNFNJwsmjcYv1asKtJGMeyIwldKHm7XKWZcUZ6CI2tf++WJGti1A== X-Received: by 2002:ae9:eb89:0:b0:69f:b960:5dc3 with SMTP id b131-20020ae9eb89000000b0069fb9605dc3mr552383qkg.305.1651261855606; Fri, 29 Apr 2022 12:50:55 -0700 (PDT) Received: from [192.168.2.100] (pool-72-79-19-93.nwrknj.east.verizon.net. [72.79.19.93]) by smtp.gmail.com with ESMTPSA id v2-20020ae9e302000000b0069fc13ce256sm59618qkf.135.2022.04.29.12.50.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Apr 2022 12:50:55 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------qGeqCP1YHFbFDyNwDCE0LY0I" Message-ID: <8d23a17b-ba8d-1e69-7fc5-b551f9df5252@gmail.com> Date: Fri, 29 Apr 2022 15:50:54 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: External psql editor Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <7fef2d5f-6698-0bb5-11fe-ffd042a24ab1@wi3ck.info> <89e71248-2fa8-c6ee-9546-93286947ed3b@appl-ecosys.com> From: Mladen Gogala In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------qGeqCP1YHFbFDyNwDCE0LY0I Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/29/22 13:35, Jan Wieck wrote: > Not that I know of. \e starts the external editor and you have to save > and exit that editor to get back to psql in order to execute it. IMHO > the whole construct has very limited usability. > > > Regards, Jan Is there a way to define the name of the temporary file created by \e command? I'd like to name it "afiedt.buf", not for sentimental reasons. I already have a cron job that cleans afiedt.buf from my home directory every hour and having psql name temporary file like that would simplify the cleaning process. The name comes from another database with the same editor construct as \e. I am actually quite used to that. Regards -- Mladen Gogala Database Consultant Tel: (347) 321-1217 https://dbwhisperer.wordpress.com --------------qGeqCP1YHFbFDyNwDCE0LY0I Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 4/29/22 13:35, Jan Wieck wrote:
Not that I know of. \e starts the external editor and you have to save and exit that editor to get back to psql in order to execute it. IMHO the whole construct has very limited usability.


Regards, Jan

Is there a way to define the name of the temporary file created by \e command? I'd like to name it "afiedt.buf", not for sentimental reasons. I already have a cron job that cleans afiedt.buf from my home directory every hour and having psql name temporary file like that would simplify the cleaning process. The name comes from another database with the same editor construct as \e. I am actually quite used to that.

Regards

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com
--------------qGeqCP1YHFbFDyNwDCE0LY0I--