Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k2XsN-0005hE-HJ for pgsql-interfaces@arkaria.postgresql.org; Mon, 03 Aug 2020 10:39:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k2XsM-0001j3-DF for pgsql-interfaces@arkaria.postgresql.org; Mon, 03 Aug 2020 10:39:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k2XsM-0001iw-5J for pgsql-interfaces@lists.postgresql.org; Mon, 03 Aug 2020 10:39:26 +0000 Received: from mail-yb1-xb41.google.com ([2607:f8b0:4864:20::b41]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k2XsJ-0000ak-SU; Mon, 03 Aug 2020 10:39:25 +0000 Received: by mail-yb1-xb41.google.com with SMTP id e14so6031926ybf.4; Mon, 03 Aug 2020 03:39:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B27CksFWBYmaBQKZmn7ZO6npZoCEomxiigG1mwRRo0U=; b=ngob6SDoAjkgN9xUXCktieCbF0lt400e8lCxp/8tP0quKRhm4R6MwLGOhBlq/iHMmi qiTa2ILfzSTMdBwrmWjVbFyoJ32ManND3vYLHZMvAxX3jufrKdpSQ+WPE2eM6RxzYEaQ 7VvUy9TjQ85OzY93EAttWPOkzDjkDklIx9af8bfWqAVEp5slcNh8quN6hZWp/JMnZC1P L/oN9PfVCVloVb4dLOB2czEUv6wW7Asw/a+eZ2JtpwrSuHBWXmGsovAbRr5NwPQLRmLn QrxQyaYwJ34sYhJ2OAEr7hofKRgyWPpfEbifb13iVg69wyVD89fnX0+NvkqMlbyQ8son l3fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B27CksFWBYmaBQKZmn7ZO6npZoCEomxiigG1mwRRo0U=; b=LSxNXkInLtUF7CEgjPxW6pN8cK90R7JzzyUiXKs9T5W9Ly08sJY3dSZEagPxFrpQb8 BrGtP2cTL01DyJeLhLW+trYRu5aT8/v2qBlqswQYsCMuTyLVrNTODFyvzQ4kg5Ecf7Cl z/ns3xySGoTwL9sNVcPQ/NaqL6fLaYNg8N06MROlIyELIYKF4qsUsA93QdADYnw6pdb1 QzvXpmgmFXHBwub+JxCoejofoRUHyou/Tr59PopAugwe1DvSAV9V2R0yGoV5SwTybBuc VxwGkxqcgIcp+8K4kesWLTc6y0Czviaayx7yyuZd1A53z5cj/egl9Td1PGmwopz5ceTR qJlQ== X-Gm-Message-State: AOAM532b71VQfvVeaBM8nUlzsPSE/7F+TbuCKYZcRimd4bbs4YYGwo0A K8UbJJWyMNUvBuakITqgF9RMPl4SWzYsq4y3pX0t8T1t/sI= X-Google-Smtp-Source: ABdhPJyP3O3fz9pOGLDhd4gN2TLAh7zVI2VeVBwEFVpHHnztDjHuZhW3s2PR3YvId++3vGWqn106q2GcreSYfobZhTY= X-Received: by 2002:a25:e045:: with SMTP id x66mr25970802ybg.372.1596451161587; Mon, 03 Aug 2020 03:39:21 -0700 (PDT) MIME-Version: 1.0 References: <1853327.1596240391@sss.pgh.pa.us> <1925404.1596292531@sss.pgh.pa.us> In-Reply-To: <1925404.1596292531@sss.pgh.pa.us> From: Ashutosh Sharma Date: Mon, 3 Aug 2020 16:09:10 +0530 Message-ID: Subject: Re: ecpg: issue related to preprocessor directives To: Tom Lane Cc: pgsql-interfaces@postgresql.org, Michael Meskes Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, Thanks for the patch. I've spent quite some time reviewing it and the changes look good to me. It looks very neat and is also crystal-clear. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com On Sat, Aug 1, 2020 at 8:05 PM Tom Lane wrote: > > I wrote: > > Looking at pgc.l, it seems that 'elif' is treated as though it were > > 'endif' followed by 'ifdef', which of course completely loses the > > expected property that a previous successful branch would keep the > > elif branch from being expanded. > > While this doesn't look terribly hard to fix, I'm a little disturbed > > by the fact that the existing semantics seem to date back to 1999 > > (b57b0e044). We're probably risking breaking existing app code if > > we change it. I think we *should* change it, of course, but I'm kind > > of inclined not to back-patch. > > Here's a proposed patch, which also clarifies the documentation, > which seemed a bit confused/misleading to me. > > As stated, I'm not sure it's wise to back-patch this aggressively > ... but maybe it'd be okay to squeeze it into v13? > > regards, tom lane >