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 1qID9I-0000q6-4i for pgsql-sql@arkaria.postgresql.org; Sat, 08 Jul 2023 18:59:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qID9G-0002HY-WF for pgsql-sql@arkaria.postgresql.org; Sat, 08 Jul 2023 18:59:15 +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 1qID9G-0002HP-NY for pgsql-sql@lists.postgresql.org; Sat, 08 Jul 2023 18:59:14 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qID9D-002kuP-Vc for pgsql-sql@lists.postgresql.org; Sat, 08 Jul 2023 18:59:13 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-31441bc0092so2989261f8f.1 for ; Sat, 08 Jul 2023 11:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688842750; x=1691434750; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xF4wG2Cs6QBvlq5QQVHXrZQ4cg9xxA/7EK6p4tlHQyA=; b=HvIJHTLxVLPc+N44pn1SdIfefY005AZEpQrrIFMR3WVKei++GZOTAyCAcMI9H/r7yr 6UyQTK19h0U197Vti9JgdYDPR5UC1qO0ccRcxQ7zQtW86/rg5nVG693oVXLN656Xakfl eMaVTp+pag3eBBnd3SKxNkHOLKif7/Jy5fnqSQWhrccTIw6DkI8YyYwM2hIFjiB16/hi BlWe9hBLX/R7acQop5NjxBPODitmTSULJynm7WH1kYAaPCqhv/m514ze3xGMcpgl5wS7 TTRTrgHzvVfrrBuIwt2S7+ZJjwrFKvyoOMYPG9FX8/KGWI38Nr2u0jHty6H+f4nFCxmk GW5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688842750; x=1691434750; h=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=xF4wG2Cs6QBvlq5QQVHXrZQ4cg9xxA/7EK6p4tlHQyA=; b=WjlZxw9a8GLRumr4dgfoBDLpifjDG2P6jwdPvAVJSn4A5PCRSa541uD9cqZH0xxvbA MiOjINJUbVdN43EV9c3w6dXvstDinG048ueoQ3xMaTXvNMy7UzUkEz+D8GtOlaKmIygr 6A5B5g+8LClJAc59BeAlQ2bQIrAn1hU03Zp8wfegdkVlvxB9x1aVcgsgdo4fXjkfv0Fh mLEKlmk6qVpA1i3NFXvXAaO7luNqOMNxXGQaLZUfQAUHJTcBdxRSMbWJqloZnj4KwA1V mkaKF5vnW+A3d0Kb/e0HJ0UVAxSvZCojAbP4LvtIBwo9ob5KvB83mX1YuKv5gkgryn6e NexQ== X-Gm-Message-State: ABy/qLa5f+Z3XQhg/gaNahG0pwzkDTs8bdlecujy1CSw96CAecgKQYp/ 4fjhRbV9FbIKQJk8jzaGivZmZBTxv/rDFwRk2Hg= X-Google-Smtp-Source: APBJJlHcPY68JkM10/WFo9bIBQ6hsF3CnTRG0ci7D0tOa+4Loe70w9fzdTDViW1IautV/B5lanjhKv8n6CHQAQfydKQ= X-Received: by 2002:adf:f108:0:b0:313:eaf5:515 with SMTP id r8-20020adff108000000b00313eaf50515mr5844608wro.6.1688842749510; Sat, 08 Jul 2023 11:59:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "David G. Johnston" Date: Sat, 8 Jul 2023 11:58:52 -0700 Message-ID: Subject: Re: Finding out types of error To: Shaozhong SHI Cc: pgsql-sql Content-Type: multipart/alternative; boundary="0000000000002a895505fffe5867" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002a895505fffe5867 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jul 8, 2023 at 11:55=E2=80=AFAM Shaozhong SHI wrote: > > Can it trap types of errors to find out what is wrong > > That is what "condition" is for. https://www.postgresql.org/docs/current/plpgsql-control-structures.html#PLP= GSQL-ERROR-TRAPPING David J. --0000000000002a895505fffe5867 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Jul 8, 2023 at 11:55=E2=80=AFAM Shaozhong SHI <= shishaozhong@gmail.com> wr= ote:

Can it tr= ap types of errors to find out what is wrong


That is what "condition" is for.
=

David J.
--0000000000002a895505fffe5867--