Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sQo1Q-00BjSk-Hv for pgsql-sql@arkaria.postgresql.org; Mon, 08 Jul 2024 13:03:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sQo1O-005q4W-3c for pgsql-sql@arkaria.postgresql.org; Mon, 08 Jul 2024 13:03:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sQo1N-005q4O-RM for pgsql-sql@lists.postgresql.org; Mon, 08 Jul 2024 13:03:09 +0000 Received: from mail-oa1-x35.google.com ([2001:4860:4864:20::35]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sQo1L-001303-EQ for pgsql-sql@lists.postgresql.org; Mon, 08 Jul 2024 13:03:09 +0000 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-24c9f630e51so2470893fac.1 for ; Mon, 08 Jul 2024 06:03:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720443785; x=1721048585; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qJhc5xfGMpOE69pq1bX3faAA3w6cMnDUczc/S4/86Uk=; b=fc5/4SHOJR5iXxNKFhCpXZHj67X0mNRVbXuyEgOwQtZefXtFiit0ZbPJ5IcVKDLu0P UTZJ83RLPsXi+YNT0DPtNJzbK+AOx9bpAYY4cIEX4Ql9xcTP/uS5zFNmSLnCl7q/M+Qw 9AGP87L48UmiI9KhDeF3wH86BbQuQKC6XO0urOHxSknjHDNjVvxXFz8RHxyoPxFh56qR uqpGHvUfI/fTolG/EMnMHy4MXbq6bECYg+W11z52VIfjl5K4Is7S0srXhmk9vvlqkCzH xDYINg6BVbwZhOQXmzrANFKIXMSiA9BXns9ErkbuxVe9yWjBRMSbsEkeh7rJEHQvVUXb syoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720443785; x=1721048585; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qJhc5xfGMpOE69pq1bX3faAA3w6cMnDUczc/S4/86Uk=; b=kDA5Et9I+GDasV0ZRvgn0vhB5SW/sfbb1dByQoALB9oyiKomWRQou267FA71Wj34e/ MyGDGeTrY+wy/w2fUmziiA043T0QPa93wpJU+hJ2tij6HN1i2dvFmgYPYJO4kXZjVMDc shgbFIrksHe4ItiJmWVsip3nijDDtpbddKikK1N3/8fsgxwJRsxVsZQnUUbXy9GsHDQn AAxwh2qS58TI2Z5tEdERGZ+Djrt28f2xblfTc51/TsSxiIlbiVFoHy91Y3fK6JZdNkMr /gL0XmHRuR4rBw3GCFJPhvyp43L5MXArTmtzRlLxekbX7DWyvYfKuX2YsgsPZ8jggQYv piJA== X-Gm-Message-State: AOJu0Yx4nWe5WdLnG5B4xpT8VQkkWnZJB7mqKQqcJ9vIG+/LFc/xTvq3 j6WffsE3JnWF9klCFHnUiH77963F4SCal+ntoy/RrNmCUmzco1gxh95qGF//2Cj78rww4qZQDtd VxUHcd9n1ZUnlLTUB7LqEsYQFT1w= X-Google-Smtp-Source: AGHT+IFDW/m943kTxszyAE/k0Aftl6cfqXvs3BJGXI3UjovnM0qh1S6zzYJExwAtmDDKJHGs1EoaYxFlnyxu8qXLd0c= X-Received: by 2002:a05:6870:7251:b0:254:77f7:7bdd with SMTP id 586e51a60fabf-25e2bf4c037mr11220201fac.50.1720443784784; Mon, 08 Jul 2024 06:03:04 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: intmail01 Date: Mon, 8 Jul 2024 16:04:55 +0300 Message-ID: Subject: Re: Trick to create alias/mirror table To: shammat@gmx.net Cc: pgsql-sql@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000a5f57f061cbc0840" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a5f57f061cbc0840 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable No. Simple view can not be updated with a GUI like PgAdmin or LibreOffice Base. Only query code can modify it and every people can not code sql. On Mon, Jul 8, 2024 at 3:09=E2=80=AFPM wrote: > intmail01 schrieb am 08.07.2024 um 13:27: > > Hi, Looking for a trick to make something like an alias or a mirror > > table. The alias can be updated. View is not suitable because it is > > read only data. The alias is always linked to the original table. > > When a modification occurred in the original table this will be > > visible in all link tables. > > This sounds very much as if a view would solve that requirement. > > Views can be updated in Postgres. Either automatically if it's a "simple > view" > or by providing a function that handles the DML. > > > > --000000000000a5f57f061cbc0840 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
No. Simple view can not be updated with a GUI like PgAdmin= or LibreOffice Base. Only query code can modify it and every people can no= t code sql.

On Mon, Jul 8, 2024 at 3:09=E2=80=AFPM <shammat@gmx.net> wrote:
intmail01 schrieb am 08.07.2024 um 13:27:=
> Hi, Looking for a trick to make something like an alias or a mirror > table. The alias can be updated. View is not suitable because it is > read only data. The alias is always linked to the original table.
> When a modification occurred in the original table this will be
> visible in all link tables.

This sounds very much as if a view would solve that requirement.

Views can be updated in Postgres. Either automatically if it's a "= simple view"
or by providing a function that handles the DML.



--000000000000a5f57f061cbc0840--