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 1uH789-00DnTr-FJ for pgsql-bugs@arkaria.postgresql.org; Mon, 19 May 2025 20:30:38 +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 1uH788-0018lt-HS for pgsql-bugs@arkaria.postgresql.org; Mon, 19 May 2025 20:30:36 +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 1uH788-0018lj-6w for pgsql-bugs@lists.postgresql.org; Mon, 19 May 2025 20:30:36 +0000 Received: from mail-il1-x12f.google.com ([2607:f8b0:4864:20::12f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uH785-002kEy-1u for pgsql-bugs@lists.postgresql.org; Mon, 19 May 2025 20:30:35 +0000 Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-3dc73b1bd7aso5364035ab.1 for ; Mon, 19 May 2025 13:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747686632; x=1748291432; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fjD4RxZZnw3xcbcYUdKSbyIALClbnjO2HdMTi3PuoJ8=; b=hm5zfU9nyZ2brQ4W7Kazj1f1epMtls3xWAnyFOMT8ipsA3anBcGRL8eLSM3bm4BMWB tawwlpiiEPqal9vOz/ggtP7H/YiGvh7UEIIh0sSiYhanW72HMeaRg4euF2175tudtzda RQ9UrWvS1sUg6aaYEsC6y3UcC3P8bsxCo+IY6SbZrA+7sreRPaWL7frd0vb3keO5bmrP QVDxp3koHvKG3q8MA9ilWlQZ3+5Nh8wMuZJtX3BTS7ragCXHT2NfNy0CrXZvm4qdB7Pp VP8vGJHJ+lw1wpdSXj4N0l690V7yweqKunrvnwunV+ZeEfPXHdwcABOF96uJ9TnEgK4z WzLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747686632; x=1748291432; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fjD4RxZZnw3xcbcYUdKSbyIALClbnjO2HdMTi3PuoJ8=; b=WY4mdyRrIfR0NRAMIhbFWofRydZaMFifejp7kCdrAnnPbGZ3b16eyCx0hBTcPC2Bxu 1zX3jCxeS1xZ9ddpE6qT+cRkiN+/8qCQ6pGBnkPSlDyoVzX95EYZoIRvkLuUAXDL4clH U6ycFTegka5zukk7dsj8s/1b27of8drS1qA/Z7uulSFraDTlJGNmudrLB+6jHU0MdYH0 y6XnDFaCLP5/kybzdfn9lSj5RTV++ZYFpVaQJcgXsXqorko5o9yVXnA4gPg+HYv4oFUS xm2uUVL4iVVdESniJBR9ahuSuiSeYMUUiJiqOkVWfDgigzNhFCCnCAwx1INzEFFQigz+ sRTg== X-Forwarded-Encrypted: i=1; AJvYcCUm2nq5yhEFHJMNGneboOcvqAkECnRHPbm1iiK+LnrY+1uBozCyTI624kB0m5iojPw1B8M0Dy3rghTG@lists.postgresql.org X-Gm-Message-State: AOJu0YxiYJNl5D53xUfU6hVTD6vB6wALET8t9dl2thBRqHcXDsOkNt3R LVAbWD8BUcjoOva1xJ7KrF4ZEhufH9ZBuSgW/fOgN4fS+VLV04E91oeR X-Gm-Gg: ASbGnct1Pw/mUtuz9yOC5J1x8aTQvvM9fWRPurDbeI4A0nzF06PsTxnugfhLhIXjcwI 4W0HD4cEUEOzYie9oG95eGWNbGEOaPZA+WQLuZ2J6/y1gNBpRitEmxnLtAdgQs/S6p4s2++GkLa u5iw7TE/V5qqXY8gDfCZqmqJavZjl1qdoV8F8/HczkK3XhbZMslNbhzVdYLCct8IT6Ltin6g/Eq oMqpQhpkXkghwfyuvnENuR3sOWoD8KZcNcxHCCOPm+oALsKIUOdt9r0bN4SFIW2rGwgBqBj9j+e RhNuX1V8l6s/kiIvwpyU8/dT0LLJyav19VG/jCQaUQHcrcn9Axu/3C/S8dr5eLsgcTfF3ijaqg4 0SqjBtieKng0s6iEMl6/nVBoZ8oaTlcb7gE4ZgAWZeg== X-Google-Smtp-Source: AGHT+IHqkE4wZA+5n2if0NPcojmgLHCGRkM2jmvRdrQ6YNj6ZkVBcHJPdj3U6uKf7/oehoO2mBRIyQ== X-Received: by 2002:a05:6e02:370e:b0:3d5:890b:8ee with SMTP id e9e14a558f8ab-3db85723a3emr146818735ab.2.1747686632156; Mon, 19 May 2025 13:30:32 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4fbcc3d2b93sm1833101173.60.2025.05.19.13.30.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 13:30:31 -0700 (PDT) Date: Mon, 19 May 2025 15:30:29 -0500 From: Nathan Bossart To: Stepan Neretin Cc: jian he , Tom Lane , phb.emaj@free.fr, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18923: pg_dump 18beta1 fails to process complex table names Message-ID: References: <18923-e79273f87c6bed69@postgresql.org> <37115.1747057899@sss.pgh.pa.us> <12329.1747335801@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="o7uBYCYcqzTYe7rG" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --o7uBYCYcqzTYe7rG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, May 19, 2025 at 02:24:47PM +0700, Stepan Neretin wrote: > + 'CREATE SCHEMA "phil\'s schema\"3"' => { > + create_sql => q{ > + CREATE SCHEMA "phil's schema""3"; > + SET search_path = "phil's schema""3"; > + DROP TABLE IF EXISTS "phil's tbl1"; > + CREATE TABLE "phil's tbl1" ( > + "phil's col11" serial PRIMARY KEY, > + "phil's col12" text > + ); > + }, > + regexp => qr/^ > + CREATE\ SCHEMA\ "phil's\ schema""3";\n > + SET\ search_path\ =\ "phil's\ schema""3";\n > + DROP\ TABLE\ IF\ EXISTS\ "phil's\ tbl1";\n > + CREATE\ TABLE\ "phil's\ tbl1"\ \(\n > + \s+"phil's\ col11"\ integer\ NOT\ NULL\ DEFAULT\ nextval\('[^']+'\)::regclass,\n > + \s+"phil's\ col12"\ text\n > + \s+CONSTRAINT\ "[^"]+"\ PRIMARY\ KEY\ \("phil's\ col11"\)\n > + \);/xm, > + like => {}, > + }, I don't think this is quite right. IIUC this test runs some commands and makes sure that a slightly adjusted version of those commands never appears in the dump output. This is presumably enough to reach the reported problem, but AFAICT most of the test content is unnecessary. I think we should simply modify an existing stats test so that we also verify the dumped stats commands, as done in the attached patch. -- nathan --o7uBYCYcqzTYe7rG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=v4-0001-pg_dump-fix-quoting-in-fetchAttributeStats.patch