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 1tRjNx-00BLJV-RB for pgsql-hackers@arkaria.postgresql.org; Sun, 29 Dec 2024 02:50:34 +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 1tRjMx-003naJ-4E for pgsql-hackers@arkaria.postgresql.org; Sun, 29 Dec 2024 02:49:30 +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.94.2) (envelope-from ) id 1tRjMw-003naA-P7 for pgsql-hackers@lists.postgresql.org; Sun, 29 Dec 2024 02:49:30 +0000 Received: from mail-vs1-xe2f.google.com ([2607:f8b0:4864:20::e2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tRjMu-0012eY-1P for pgsql-hackers@lists.postgresql.org; Sun, 29 Dec 2024 02:49:29 +0000 Received: by mail-vs1-xe2f.google.com with SMTP id ada2fe7eead31-4afd56903b7so1949318137.1 for ; Sat, 28 Dec 2024 18:49:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735440567; x=1736045367; darn=lists.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=Fmp/6Bs5ytQJafyf4sdl+90EMn/EPrdkaw3D4b6sEd8=; b=ftwyjB3ZusrQSI8S3ssOtrRSPt7VHCTkgwzeD84/3Qwa3Iat8NEE/keVRelGwbXiPa elsM1ICmfIKEyXoNOmcF1uwUvsslQ5j7WJ2pWn+HGsZrAsCyNW96CawkwMUCkB4b88Cl nyVJckpfZMm0LFUUhd4RLGl8EzEVtQnhMVIpMqNRqrcRUPUiQrKNhlDEZlveyY3AXxIT SyheIMEzWyxgXSeEHsV/WnS5NAe/KD+X17TW/Y7wqHXcNffGky9JcttVSWxbKjea7/zM OkBv28/54PnNJLq49m2A0su8G24+1Huts6dUFjFv2f+FOraUrf3Vhw/E/c8phZ42FPXR +HyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735440567; x=1736045367; h=content-transfer-encoding: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=Fmp/6Bs5ytQJafyf4sdl+90EMn/EPrdkaw3D4b6sEd8=; b=dHKLHC7+19VExebLXP6aBy2p9befda9fv+F4t8UqYtKJ+qY3O2xSN3VQHq86+s7NYB nZXjy8yyW2hGReXskCIY7L/aRd8u93bLNK8BAcBIR1SjZcr1+Tw5DCKbLsxexK8R0sz3 S/B52CuhqGS4kF7s8+i+npz1QGBF+bRobOnu8SOtGXqvJK8UOa2UHb51DGSlIA/h6Px2 hNChJLJUzIrpV2q/wF6HqxJ/aBL1X6GZT0lwwXaO4kfHcqh3l9KZQ9Kulw3YOme+HOCK +V3B6FDmmY3Rx0s0MEH79UPXa9pO4et3q5TwZD2h3/qPsP0I8gQKWvZH5dvZIQyRrGJq BJtA== X-Forwarded-Encrypted: i=1; AJvYcCX6bQJ2xUetfXC54NOfrNU295u8hvRytShN9kh+ufSPXnofW+XRGl8kYHq4t/uW9mGnTnfRjii5y2mW3YG+@lists.postgresql.org X-Gm-Message-State: AOJu0YzNlHGIbNMGApdlmEDf8l5qvrijoQCBR/2EUdOS7+HiTZNrNc6/ Hy7WGPhbknHhLEYBJ/EZ6Hxp/y2H+yf0YL7KdxtbHwXh+eiWhrswQUpzXmYfPswVU2n6V/1H7tM HM9Kj0p9EEf9DCTvOTJ7rKAehY8U= X-Gm-Gg: ASbGncvBgIj9822D1oSxBjJDSd5ywqbcRGlormofYM+e72ozEkThhrhYiOh8/cixEj8 Fqnvvm9S4pKg/cW189bU59OdOPp70kASnajsC6mE= X-Google-Smtp-Source: AGHT+IEW0YSce+PIIohNquOe061iBKXSDFolA94768mUWgAeqtaeY2yMqcr060bp/1Lh+VYwrJA2WaLnxJSDBBDA8HQ= X-Received: by 2002:a05:6122:240a:b0:515:4fab:28c6 with SMTP id 71dfb90a1353d-51b75c5985amr24167200e0c.4.1735440567451; Sat, 28 Dec 2024 18:49:27 -0800 (PST) MIME-Version: 1.0 References: <3chredgnjcmccym2kczawfih226b4ac6co7p6z4jeofevrcosi@mrsxkx2x2c65> <20241120201313.t4wbhld4ktgielaf@erthalion.local> In-Reply-To: From: jian he Date: Sun, 29 Dec 2024 10:48:51 +0800 Message-ID: Subject: Re: Re: proposal: schema variables To: Pavel Stehule Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Laurenz Albe , Erik Rijkers , Michael Paquier , Amit Kapila , DUVAL REMI , 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 Sun, Dec 29, 2024 at 5:50=E2=80=AFAM Pavel Stehule wrote: > > Hi > > >> ------------------<<>>>--------------- >> + else >> + { >> + /* the last field of list can be star too */ >> + Assert(IsA(field2, A_Star)); >> + >> + /* >> + * In this case, the field1 should be variable name. But >> + * direct unboxing of composite session variables is not >> + * supported now, and then we don't need to try lookup >> + * related variable. >> + * >> + * Unboxing is supported by syntax (var).* >> + */ >> + return InvalidOid; >> + } >> I don't fully understand the above comments, > > > The parser allows only two syntaxes - identifier.identifier or identifier= .star. Second > syntax is not supported by session variables, and then I didn't try to se= arch for the variable. > Some users can be confused by similar syntaxes identifier.* and (identifi= er).* Only > second syntax is composite unboxing, and only second syntax is supported = for > session variables. > > Maybe the note about unboxing is messy there? > >> add >> `elog(INFO, "%s:%d called", __FILE__, __LINE__); ` within the ELSE branc= h. >> Then I found out the ELSE branch doesn't have coverage tests. > > > I don't understand this comment? I don't use elog(INFO anywhere > > sorry for confusion, i mean, i added " elog(INFO", the regress test is still successful, therefore it means the above ELSE branch code doesn't have coverage tests.