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 1fct7z-0003it-AT for pgsql-general@arkaria.postgresql.org; Tue, 10 Jul 2018 13:56:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fct7x-0008BR-PE for pgsql-general@arkaria.postgresql.org; Tue, 10 Jul 2018 13:56:25 +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 1fct7x-0008BJ-DQ for pgsql-general@lists.postgresql.org; Tue, 10 Jul 2018 13:56:25 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fct7v-0005Vh-0X for pgsql-general@postgresql.org; Tue, 10 Jul 2018 13:56:24 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id F41B921F49; Tue, 10 Jul 2018 09:56:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 10 Jul 2018 09:56:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=O+08+osmswBoIsq6BIDk6sJWuQxY0 5GOIRRV2GACPl4=; b=owiPgG1wNRRSfH6IJMYOLHCShQ9N51Fl9nz/5zSCsglEO pRwNVxHZuIDRh5cGLaAtdeU+QmmJJJeTavuL079uECfkk3HTHrUJ/DYvrbJVUB7r qhYdXUho8ZAiUEQeKLRnbKNbpxU8QMniNXzXojDTkY5+ijViRi9Cgk2F2v2yj43+ xCiI3ujUT7G/mmP3you2UcdT4T5jkumN2oWg19PCDocc2TTTNZZjwTK0kMf5v0RY AvX+SSbPhLbruAn83dC7okCV8a23fDXpEQQeLXBdZQvsHJZ7IuvSlJq8F01kw9jX lh2bVMGqIWbCR4J8iDYhptGAhb/v1UjXv8BGrCwwg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=O+08+o smswBoIsq6BIDk6sJWuQxY05GOIRRV2GACPl4=; b=MfcJzn6ViyJbNozS3AxBs6 mPb24UH9OgPkdZI0rTvkQz0hNZ5b4a6Ru0XX9UcMAHJXZqWg89t4inSvON4pf1eE potthW1qfJJw+JBy6s/TkJRUF9ULKZjzotcDcPbx3eQtVIqI3O4L1TeV30YAPscR wcs8bsj6nngY5i/OQ/72hCcqjHoCEK77Jp1/xbuJ0P/UUE9vyWOt0Jjes+FLkVIi NYLAWFfCgEtimCqit1djp4+56kqXdzImTe3XbyHCfW/mzoIMfRonUhkGh9+t4pam SeoyXiraNWCw2VP9hNC/MLjl5V7PX8VzoW+6lMKDETETv2wdFS4Z59ozdXDWQHMA == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.181]) by mail.messagingengine.com (Postfix) with ESMTPA id 0C9E3E490D; Tue, 10 Jul 2018 09:56:20 -0400 (EDT) Subject: Re: Create event triger To: =?UTF-8?Q?=c5=81ukasz_Jarych?= , guillaume@lelarge.info Cc: "pgsql-general@postgresql.org >> PG-General Mailing List" References: From: Adrian Klaver Message-ID: <151c887a-d5b1-e8be-4ab6-0007f32895d4@aklaver.com> Date: Tue, 10 Jul 2018 06:56:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 07/10/2018 02:30 AM, Ɓukasz Jarych wrote: > Maybe yes, > > but for me when i am learning it is not... How do you do CREATE TABLE now, ad hoc in the client or via scripts? If via scripts you could create a template script for the trigger and then just fill in the table name as needed. A function to add the trigger would be more involved and I do not have the time at the moment to create an example. Will see if I can come up with something later. > > Best, > Jacek > -- Adrian Klaver adrian.klaver@aklaver.com