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 1lPif6-0002ai-Li for pgsql-admin@arkaria.postgresql.org; Fri, 26 Mar 2021 09:21:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lPif5-0005yR-JM for pgsql-admin@arkaria.postgresql.org; Fri, 26 Mar 2021 09:21:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lPif5-0005yK-7d for pgsql-admin@lists.postgresql.org; Fri, 26 Mar 2021 09:21:47 +0000 Received: from mail.pscs.co.uk ([195.224.19.137]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lPif2-0002Kh-As for pgsql-admin@lists.postgresql.org; Fri, 26 Mar 2021 09:21:46 +0000 Authentication-Results: mail.pscs.co.uk; spf=none; auth=pass (cram-md5) smtp.auth=pscs Received: from lmail.pscs.co.uk ([192.168.66.70]) by mail.pscs.co.uk ([10.224.19.137] running VPOP3) with ESMTPSA (TLSv1.3 TLS_AES_256_GCM_SHA384) for ; Fri, 26 Mar 2021 09:21:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pscs.co.uk; q=dns/txt; s=lmail; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To :Content-Type:Content-Transfer-Encoding:Cc:Reply-to:Sender; t=1616750162; x=1617354962; bh=SZJoovf0IioDbK3SPgPH9DNelaIzM0TeNSx43hzJtDA=; b=ebATZZj3RslefV5U7+A9TEWtJqhqxTiXaHjE3DblN+PDWGoPdO5l1Efzb4LFXO7MDzAhdk+q nYZRs5EvW0HGYPnMNqLvjwTbScPBi0gmbSllAJ/jtfaGd0h+VzgpAF8UbJy6uijC8Tzv1ZIN7o gpOGcnQYbDESdOXC6MFbotRJE= Authentication-Results: lmail.pscs.co.uk; spf=none; auth=pass (cram-md5) smtp.auth=paul Received: from [192.168.57.136] ([82.68.48.206] (82-68-48-206.dsl.in-addr.zen.co.uk)) by lmail.pscs.co.uk ([192.168.66.70] running VPOP3) with ESMTPSA (TLSv1.3 TLS_AES_256_GCM_SHA384); Fri, 26 Mar 2021 09:16:00 -0000 Subject: Re: Creating redwood datestyle in Postgres 12 To: pgsql-admin@lists.postgresql.org References: <5273bd68ae53e76fb592249ba05433b4bb645660.camel@cybertec.at> From: Paul Smith Message-ID: Date: Fri, 26 Mar 2021 09:16:00 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-Authenticated-Sender: paul X-Server: VPOP3 Enterprise V8.1 - Registered to: PSCS X-Organisation: Paul Smith Computer Services X-VPOP3Tester: 12 345 X-Authenticated-Sender: pscs List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 25/03/2021 12:38, Tim wrote: > Its a native ORACLE date formatting which shows like this: 08-JAN-99 > 04:05:06  set in the datestyle config param. > > Currently running on EDB Advanced Server 12 which allows it as a > datestyle configuration setting, but looking to migrate off of there > to native postgres pretty soon and was hoping there was some way to > have the same setting globally in native postgres. Which is starting > to look like is not possible. Could you create views/rules/triggers to do the conversions for you? Eg, if you have a table 'invoices', then create a view 'invoices_' and set it to set your formatting, and use rules to allow updates/inserts via that view. That might need less changes to the code. -- Paul Paul Smith Computer Services support@pscs.co.uk - 01484 855800 -- Paul Smith Computer Services Tel: 01484 855800 Vat No: GB 685 6987 53 Sign up for news & updates at http://www.pscs.co.uk/go/subscribe