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 1tICnX-00Ct9M-Ts for pgsql-novice@arkaria.postgresql.org; Mon, 02 Dec 2024 20:13:35 +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 1tICnU-0033nq-Rc for pgsql-novice@arkaria.postgresql.org; Mon, 02 Dec 2024 20:13:34 +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 1tICnU-0033nh-HN for pgsql-novice@lists.postgresql.org; Mon, 02 Dec 2024 20:13:33 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tICnT-000hut-Ad for pgsql-novice@lists.postgresql.org; Mon, 02 Dec 2024 20:13:32 +0000 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-aa5500f7a75so754829466b.0 for ; Mon, 02 Dec 2024 12:13:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1733170409; x=1733775209; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=0WuCINHMwSPyMC0SbSKtPXBLyHeV2DCtjeQfY0yOcGk=; b=JONm1XNwy1YTP29xk5gIJttxx3q73h15Sh1Mc2iVqqagLfkK+F1dXvjB+uvBLi7r15 3kfLvdyQFDRYFgZuQ+Zv6F5SzXHWcUFYCiXWoVKStiq9ykhAANA4T6xW1epPCuljxwTB MBsDB33nHS+rH/4BTJpFoQbE33HJ2ORdub8d50zpeIvQekHaPHqGca5seb0fUiOYW+E/ 8TO9siocl0rIFYqgwOmhnzxIw7kuIgzSzxpXI2Sr0MqMbUajrp2V+bd+ckg0uN07O4D8 IFggKQWjwOcAb7m80Gann0Fc9h77A0B+tIZX2PB85YI6zIz/Q+Nntlbv830SIEUbCQI4 xlKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733170409; x=1733775209; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=0WuCINHMwSPyMC0SbSKtPXBLyHeV2DCtjeQfY0yOcGk=; b=kblKbe3Xt8PZ5vA5gBNmABXZHVg+4HoQnuNdR6r8JR1X/loL5Eg76hYyHe9PvvSLod qCcP6kcM7rwO3vdIiUFZVHpJWnVjgbuKwtMZ8Op5NlLlbKO+x4D3z7eRghS8qAyDaHX1 EtVZkUXJJOgKQOFT2opGUA/gZlJEv9no2exBzcjeYooJSEfsdvBD6njwmvayvLZ6bEb0 Xd01sagcINcmttCJFt5otIp0WdFrvVPAYi+on5WkoP/kPdqDjMBSHm1tiJYW5bpDQa24 TFjpm9mmTAOa64czZPdUchkBBjjmexit4TLtNms1kMEoVFWdvPScDvNUIiY0lQtvmmjs DB3g== X-Forwarded-Encrypted: i=1; AJvYcCUBTmfUhbwgxTL1IX7pIx9+5OT48/3d6+bmp266PZ+DI0qYmZo0mrYbo40NcKMNGoGKyPaBQX5XbdrhPgU=@lists.postgresql.org X-Gm-Message-State: AOJu0YybKvGzsWoAb7VNT0270A34+YdlGXLD2DjKgZfCF6J/j1UdESjC L/4YVwXVFhJOs8D9nN+HO4wWGDNBJChPZQ30pHhUrpC8D7pQqQwWRyDJZeCTfnANldG0pCypfFZ u+uM= X-Gm-Gg: ASbGnct5b4UATeM9wx/qajecmCad3Dpt1RJxouqWWyB1hZuyxS6fEjZ81fh0GdP7Qm4 pFG14D7ypErJeucvN+PZPkYFkNVoh9PdL/8HpVDyk4ynT0Gt8kHGmlQLGvx4tFOb65XC8jkZ1oF oKEtxOlfuKgNutiSq1NVDjP6QoGeMhZP21TW4pUWENKjkdK643js3ekZ4pIe7BFn1Ysm49VNEf0 KV6NMOj2FiQF82UDaO+RRD5WSXhhyvBHvrIQM4/fiMeMsFyikDAk2y13gIOYf8g+4PTpTj5YiRE AcDRB4wxNSvhQBatoWp81c0c3GHQ1IB7EqM6hIn5SxLrMbS7FA== X-Google-Smtp-Source: AGHT+IFAYY4TO6sSK6cObljzcTStvDUOh0REVLrPta3dH4Q/97aQlX6ycR1An1si/VTwhZEJqhXQgA== X-Received: by 2002:a17:906:31c1:b0:a9e:d7e3:ccae with SMTP id a640c23a62f3a-aa580f2bc79mr2384639866b.16.1733170409351; Mon, 02 Dec 2024 12:13:29 -0800 (PST) Received: from localhost.localdomain (dslb-002-200-202-108.002.200.pools.vodafone-ip.de. [2.200.202.108]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa5998e64d0sm540707366b.93.2024.12.02.12.13.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 12:13:29 -0800 (PST) Message-ID: Subject: Re: Command Line option misunderstanding From: Laurenz Albe To: punch-hassle-guise@duck.com, pgsql-novice@lists.postgresql.org Date: Mon, 02 Dec 2024 21:13:28 +0100 In-Reply-To: <487DB217-EA37-4139-AB97-B61B04ECAEA7.1@smtp-inbound1.duck.com> References: <487DB217-EA37-4139-AB97-B61B04ECAEA7.1@smtp-inbound1.duck.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.4 (3.52.4-2.fc40) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2024-12-02 at 13:47 -0500, punch-hassle-guise@duck.com wrote: > psql -h anna -d GT7 -v v1=3D12 -c 'select :v1' >=20 > autocommit on >=20 > ERROR:=C2=A0 syntax error at or near ":" > LINE 1: select :v1 The documentation says: -c command --command=3Dcommand [...] command must be either a command string that is completely parsable by = the server (i.e., it contains no psql-specific features), or a single backslash co= mmand. Now variables are definitely a psql-specific feature, so variable substitut= ion won't work. Use a here document! Yours, Laurenz Albe