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.96) (envelope-from ) id 1wMKIo-002O0S-2w for pgsql-hackers@arkaria.postgresql.org; Mon, 11 May 2026 06:39:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wMKIn-00GOXu-2P for pgsql-hackers@arkaria.postgresql.org; Mon, 11 May 2026 06:39:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wMKIn-00GOXm-1H for pgsql-hackers@lists.postgresql.org; Mon, 11 May 2026 06:39:41 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wMKIk-00000001EkZ-3xvG for pgsql-hackers@postgresql.org; Mon, 11 May 2026 06:39:40 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-459bf19e87bso132249f8f.1 for ; Sun, 10 May 2026 23:39:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778481577; cv=none; d=google.com; s=arc-20240605; b=J/Q7fZvJKOGIOTNljC49c8FmsreKRKo4H9SGTfix+YnPQisfF68+NVP3uR5nPdOFSr ZbBZr+P9G2+2Iqq37MO0mxAAcvmbRBQdzzqfoh60u0JvhFT5SJfZ35TVbYWjG4ppqbM8 0z4FGexwC8HG1dW5Ad2aLJ7da21fu8CejfXK2P5aVNldwddRfiT3WNlBbiq2jWIjz5fK yFEcrVD1wXSzb4VoxpEOhWKcEVYJc2akRMqFQWVUQ+b7m+RM8R7Mtve6duJ1VEAQdpDs eeFXw6/VdFlrCxY7Dwyb42Ld0qW3AZQH4Qetm3Qh+pbQGC0vOMljX4btosf81VZP/hof tqpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zeYRXKvrLkLM/tEweGZ/YyxjkrAx0UtGuZ41wySexB0=; fh=Gc3ImqnGm9R3S6ApzCtMmqQvsClql3ccphT6iI3h2MM=; b=Pz9XivqZVgLMemr9zJFXJ2RPOqARlqRxSpZCqL8/kRB7ZAeiIfYnbh5haMoHi4ut7p ZAKuN0a/IjHh/6isncqxztKQTxry87xZLbnxZpGx7oUK3en9RO5Kvj73nPquKXXA0DMG h9Lq4v5gzvXDVwW+H107X4W9wK9FFsC4LVjwN9hADmdJpvNnGhQdmff5VFu7nwCcfWzf t7h9yQBAXGpLq179RoQqEunBDBpbIoURM7dA74ebyoUumxR9bJZ2UAC+83BgnITb4ISJ 2uLRqw2hrhfTrn2dtsxO4EpA1fkBDaATkmTSAfSA8x0JMMA8lKLt0MF/RIIaoQgpYM0/ M6hA==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778481577; x=1779086377; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zeYRXKvrLkLM/tEweGZ/YyxjkrAx0UtGuZ41wySexB0=; b=AsBlVlcH9uK+PFvuWmVcweXB+JYR2mFjKrHVYRImi52MVk193dh+XwO3+5ZQYsSgjR +55gJi93Gvlxr+C8Zx/gn2U/ARzo9sxVBr55mPE8fjW5RPOnT8WsN8C5MH29GaWi21h8 91VHrA93gLAoewVcgJ2wHG+ktfHqxtEfTSy7OjX89vanebKqoOSPAgJWX2xGYWvnyrEg c7LkXGFA01jQMMiRWFpuva3+oIpCZjx/d7GOOdEfESA1JJuIpLCeF0r7VKX5cN7XseJo nO4duE5viRUa4NR2AJ64IZR+dnzh6sg+NjGhBffk9UfxqDsyw7AHKPazRPMML+Na0yJO UrDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778481577; x=1779086377; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zeYRXKvrLkLM/tEweGZ/YyxjkrAx0UtGuZ41wySexB0=; b=SjYQnQIY8vzTuL1/Ku2X1uj87UHfaBPyFGb6em1L1BY9aLjY/1Q+ArVm+HXXeDDa+F zvYwl4YNtUUF6ANEstqjXLgH81QI3oAZVHUil1POtMm2gh8EBOAh0KwTiFD8LZ/BzMe8 yclO8B9U5pgKknhKAob9aQf6BrB2bbcE0MJbO338cRFoHh4M7ZcGD3gQihqNObhhNZ0b 9VTAcmxXkrYtlD8nPucyYuYh0WH7eYdq6MxPkb59jpxPTdeDfcTqTnSkELHCnIYmbMXh GBoWZ1tDzbd4rU/dmgFekhZvLD/rwJVgJ37hMVNRvh8DJYM1pZ9vYz45A1NPP6Pv1UlI oFkQ== X-Forwarded-Encrypted: i=1; AFNElJ/vl2ub94iZbdOCqkSLvXgE+jpnCgkgMtbbpc9lrXk+wLWHSMlVi29GZBTIkj1XTT9Gpvd/cHnksU4gggnL@postgresql.org X-Gm-Message-State: AOJu0YwlmFj9xvU7XIAa2YrJksyN2NtctcvG2VaSQ8GgMvnH7iuoJlO4 G5kH7AFZxikwo4W0zvcbuavcQvBRTDnhDjUxJLETUovAOMVQCRyJ9IpT350ZIIgxOoSZ1YrWbck 9EvBwX2+L2IM8GoxRuZeAxTa5BTfQZp0= X-Gm-Gg: Acq92OGLJmUC73W9YYWjKOjbh4lgTtzlNFgFJ25TuJhDuj43vlaKVijVAzAZ2aGW68v FgnJy1jYOYWPjK+GZBDblUjsmyAueQc4BohmSxsrzjtJIYnWBV4+Q4sL4sBJGotwkLfrw/w8Rl8 6SxjixdSMj/YdTv5Ql4FQ+UCv3iUZc9FWwCS125hHScHSPns1KJaxoVBzT+BriaowMe2yykYdXZ o8AnxhxBP9b6v+GqempfJkTGCUE+e6/yafRbhHvybq53TxAHP5WVoHB0z80w2nN2xIQ2PjsjJHx UM2eOg8djf/Nz18nc4O/OnXhfznq1Obyd/8uF+5GlqwJGH0cDiIrjxVf8yJftQ== X-Received: by 2002:a05:6000:24c3:b0:441:3144:efc5 with SMTP id ffacd0b85a97d-45463d8a9a9mr20179009f8f.42.1778481576736; Sun, 10 May 2026 23:39:36 -0700 (PDT) MIME-Version: 1.0 References: <459ea164-aa38-43dd-8c93-dbb1063d20b5@eisentraut.org> In-Reply-To: <459ea164-aa38-43dd-8c93-dbb1063d20b5@eisentraut.org> From: Ashutosh Bapat Date: Mon, 11 May 2026 12:09:24 +0530 X-Gm-Features: AVHnY4KubBbfGTFHvklZK0dShlwBrJGkKP8w0oQsJYzam2nlWJfoSUAXUzTjG9w Message-ID: Subject: Re: [PATCH] Clean up property graph error messages To: Peter Eisentraut Cc: Ayush Tiwari , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, May 7, 2026 at 2:15=E2=80=AFPM Peter Eisentraut wrote: > > On 04.05.26 21:57, Ayush Tiwari wrote: > > While looking at the SQL/PGQ property graph error paths, I noticed a > > few small cleanups in propgraphcmds.c. > > > > The attached patch fixes a user-visible error message from "mismatching > > properties names" to "mismatching property names", > > I have fixed that. > > > and moves a > > ReleaseSysCache() call before an ERROR ereport in > > check_element_properties(). > > > > The existing code should be cleaned up by > > the resource owner on the ERROR path, but the explicit ReleaseSysCache(= ) > > placed after ereport(ERROR) was unreachable. > > I think that's fine. I don't think the change makes this better. > Yeah. If we call ReleaseSysCache before ereport(), we need to add local variables as you have done, which increases the lines of code. Since ereport will never return, ReleaseSysCache() is not needed at all. But leaving it there helps justifying fetching the attributes in the ereport call. FWIW, it makes the code future proof, in a very rare case if someone makes ereport conditional. --=20 Best Wishes, Ashutosh Bapat