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 1mQZJr-00008s-GO for pgsql-general@arkaria.postgresql.org; Wed, 15 Sep 2021 18:07:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mQZJq-0000zY-EX for pgsql-general@arkaria.postgresql.org; Wed, 15 Sep 2021 18:07:38 +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 1mQZJq-0000zQ-5V for pgsql-general@lists.postgresql.org; Wed, 15 Sep 2021 18:07:38 +0000 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mQZJo-0003M5-5S for pgsql-general@lists.postgresql.org; Wed, 15 Sep 2021 18:07:37 +0000 Received: by mail-ot1-x332.google.com with SMTP id i8-20020a056830402800b0051afc3e373aso4735723ots.5 for ; Wed, 15 Sep 2021 11:07:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=fAUPvhyfzDX7plPg+MAPnPaXcrm9AMo9e8IKCr4Vb9M=; b=fCArRYsqQm7trnNW4b+r0QNWJ/sQBiWKoXXeEHrXZPZoXtYEUqpKk3Cak29OJQiYjl SFwhAl82UxHqsB5TIDawSiIS7hs85knUPnzPRG8dP3mxkFslUDf0ARRBX/jnRNZGIsA2 me8iGWTYciwYmVXSPtMOQ9pN4xRSzXfYbHWCHznY9OY3FBMTjRq8+6496p/Ygr9O5r+o ao/Hspgs+V1kzeIEJ6SczLTkIFH7t0US20JXFkhL14FMh02LPVHIi8fo1kvAie52SsEm FHTBk5JAiD1KpdpXTPEMQsB5mR8BX3j5f5lZHv1Ik4yVChNSLoF8ump7fgxK7nW5AMUT Ljqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=fAUPvhyfzDX7plPg+MAPnPaXcrm9AMo9e8IKCr4Vb9M=; b=r+IMY2wFIwoj1bTjWW6ggdge7tHKFx8dNTfr/CaYPaGuPfX3PavZWMuhVnm8ILR8za V+BWRouaXn46Fkiu41EG7mfp99cHQyhi2KSVCGjTv4RmM20LxtRaJtqNrGxfltIXry8A XdjWeaMLRDbt8KWEWjiAksPCiccxorDreqImOIYBb0tiWlQXb00nSM8pnRTdsoaI9GWQ lnehX/bEnO21A+JkmeyDyEH4tcK8m9HNkiQXDGcbNq3ZFQShfQxFWJ31eIYDDrXsWLr9 Wl2B4bMVLU/wfwejiETi3n5AAJZf1CN23ypbvw1f9yZ6w99NBONhfit1a5w1au8l52oE eI5Q== X-Gm-Message-State: AOAM532seh2e9teuLr4VrpLQ3OBpvZkpzNPrOwq3yWRWl1piRv9GrTdI lYHW/e+Mv5pIOivfYgkNA/WID7iOUx4= X-Google-Smtp-Source: ABdhPJwEOeeWI+qkbcm9Hva+VomsGTgTCnLFEL2mEMfeXm/FqnX1KM7TgeSDqqtYhoJrCMcwoFvyaA== X-Received: by 2002:a05:6830:40cb:: with SMTP id h11mr1181159otu.176.1631729254998; Wed, 15 Sep 2021 11:07:34 -0700 (PDT) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id r23sm151266otu.54.2021.09.15.11.07.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Sep 2021 11:07:34 -0700 (PDT) Subject: Re: Alter and move corresponding: was The tragedy of SQL To: pgsql-general@lists.postgresql.org References: <4dc338ad-b0aa-4f4c-bd9c-4dc76dda9e8b@Spark> <05ac2565-b692-c73f-93f0-3bbf738e3bfc@gmail.com> <3d4db5f5-376e-8467-a435-e5f45d96991a@archidevsys.co.nz> <20210915125241.35179374@mydesk.domain.cxm> From: Ron Message-ID: Date: Wed, 15 Sep 2021 13:07:33 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210915125241.35179374@mydesk.domain.cxm> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/15/21 11:52 AM, Steve Litt wrote: > Gavin Flower said on Wed, 15 Sep 2021 13:49:39 +1200 > >> Hi Michael, > [snip] > >>> COBOL has strange verbs like 'move corresponding' that could >>> accomplish complicated tasks in a few lines but you have to be >>> careful that you knew what you were asking for! MOVE CORRESPONDING is awesome, and a heck of a lot less dangerous than doing your own memory management in C!! >>> In our site that was banned as being too dangerous. >>> >>> And how about the 'lovely' ALTER GOTO construct??? >>> >>> Children don't try to use these constructs at home, as even >>> experienced adults get burnt using them! > I never Cobolled professionally, but took 3 semesters of Cobol and > Santa Monica Community College in Santa Monica, California USA. They > taught us move corresponding, I used it, it was handy. I'd use it again > if I were a Cobol professional. > > As far as alter, in 1981, before I became a programmer, I asked my > Cobol Programmer friend if there was anything you could put in a > program that would get you fired. He said yes, the alter statement :-). > In my 3 semesters of Cobol, I never once used the Alter statement. Jump tables are great in scripting languages which let you embed a variable in a variable name.  Naturally, you must be careful; explicit variable names always help... -- Angular momentum makes the world go 'round.