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 1r2CXA-00FT14-04 for pgsql-general@arkaria.postgresql.org; Sun, 12 Nov 2023 15:38:00 +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 1r2CX8-00ArSR-5N for pgsql-general@arkaria.postgresql.org; Sun, 12 Nov 2023 15:37:58 +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 1r2CX7-00ArRY-Om for pgsql-general@lists.postgresql.org; Sun, 12 Nov 2023 15:37:57 +0000 Received: from mail-yb1-xb33.google.com ([2607:f8b0:4864:20::b33]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r2CX0-0064dh-1X for pgsql-general@lists.postgresql.org; Sun, 12 Nov 2023 15:37:57 +0000 Received: by mail-yb1-xb33.google.com with SMTP id 3f1490d57ef6-da7238b3eb4so3952781276.1 for ; Sun, 12 Nov 2023 07:37:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699803468; x=1700408268; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=AD1Wel9Z5k7KfQpXkhD3msW0sPnNG2/+m6Qgyr7GGjE=; b=dBajnMOFyZqnZWlk7Xk4g0FYbIpae/ela9mk87E1yES71Ws4c92QFD9vCSJf6JOvCZ MtvwFDV1fty6SYVJcsn2EdwGticKiA7cvN9rCuXJfjGQKU+C5MdtA/ABTjmrv2rTTzBm wHZuP3uXnDNnZw/CvcPQ9K+8YHoNIsGmSvcMOzbt2T9dbVvEH+PEMS6BUjtDsBqCvQM1 WqaAmLyW0/ap+o6l+QsX/zp9sPKJ4Ftb/x52KYcnb2i+m12vkRJ10vZiLweeFqX0M81c +QTd9GNuXOf2DsVFfZ0a7rAK1CrXzy/DuDx2lR4hVP5LvyhikYfgoAFJqLQ87s8fjeVN 5U/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699803468; x=1700408268; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AD1Wel9Z5k7KfQpXkhD3msW0sPnNG2/+m6Qgyr7GGjE=; b=pb88s3S0M2NL+z/e5rDN6qkahClIShRvhIi4dNyPw+edwavp4XDkXgZyMcEo7nrpoI ye0A62z6nU7hCOfPPYvqSqQgC7/gHLWVGyIK8titjRlUppSLEknwSXMQkS+XwC8Zh+GC 2FW6E2oLWPNVHp8oPz8mh6vi4JNVbzFB93YO2Km3ysAvbTEjcPRP0aUDlmDLp7gZvjAM SXBPCZPCD/C8ohXF3OnBAF3bgTgQgSSGSNptIDFP8BRocAWm4ZHawg8x+6Ft2eEbuXf8 mAAz/vtUn7vToLOdQC+cTkH5lSQjI2NUNGAlHYWy0nLuqTcx+se/kfONECfcQ9jrxeKA 6gJQ== X-Gm-Message-State: AOJu0YyEANCnnSzNp35ccxML8QDYMgGC9mMytxRZcYFhk9umJUEoUQHE IkK5m32kNVT/lP6Y6Yfb/Vdo1YersmA= X-Google-Smtp-Source: AGHT+IHMLq9Ymj0BP+yVtHJB4NtNpUTNt9vJ+7mXHIO92POz2tRL3JwvC1dyJ3Qg01Uqao0reXaW7A== X-Received: by 2002:a25:4f03:0:b0:d91:fdb:afd4 with SMTP id d3-20020a254f03000000b00d910fdbafd4mr3115082ybb.16.1699803467746; Sun, 12 Nov 2023 07:37:47 -0800 (PST) Received: from ?IPV6:2600:1700:bd2c:b810::44? ([2600:1700:bd2c:b810::44]) by smtp.googlemail.com with ESMTPSA id g11-20020a05690203cb00b00d9a3fe483cfsm1018752ybs.23.2023.11.12.07.37.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Nov 2023 07:37:47 -0800 (PST) Message-ID: <8e2dca7c-e73d-41c7-83d1-28e5b414eaf1@gmail.com> Date: Sun, 12 Nov 2023 09:37:47 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Conditional compilation Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <1ed285e8-2ac0-4873-87e9-02a4d412732d@gelassene-pferde.biz> From: Ron In-Reply-To: <1ed285e8-2ac0-4873-87e9-02a4d412732d@gelassene-pferde.biz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/12/23 09:32, Thiemo Kellner wrote: > Hi > > Does PostgreSQL have something like Oracle's conditional compilation? This > is sort of an if then statement that gets evaluated on > compilation/installation time of PL/SQL code. If the condition is met, the > code until the $END gets compiled. It is even possible to switch on/off > parts of single statements. I suppose it is sort of a preprocessor that > removes the code part from $IF until $END if the condition is not met. Pl/PgSQL is an interpreted language; there is no compilation.  At creation/installation, it just (I think) does syntax checks; it definitely doesn't care if a table exists or not. -- Born in Arizona, moved to Babylonia.