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.96) (envelope-from ) id 1wFRxc-0058AN-1B for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Apr 2026 07:25:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFRxa-00CF1Y-1s for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Apr 2026 07:25:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFRxa-00CF1Q-08 for pgsql-hackers@lists.postgresql.org; Wed, 22 Apr 2026 07:25:22 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFRxX-00000002DM3-1kZi for pgsql-hackers@lists.postgresql.org; Wed, 22 Apr 2026 07:25:21 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-82f8bf96b46so2533289b3a.2 for ; Wed, 22 Apr 2026 00:25:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776842719; x=1777447519; darn=lists.postgresql.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=de2O5WnQ8UemtO/3LhVBnJpF2XKAoQmu3IyJOxz+oMM=; b=pejb1/ZmqU3A+vgzYeysLmZyxLPyknO8pHrJ8Ow6xoecnKLM8ccsG3jpGlCnt4nNhf 1dw0KXdDkLv1WjOj3q4sIbYuMxyvcEOGQ3Pf0JnLFfo0Ptd3zSg+y6MnFub+u7+cAEsG JBflu9FUXNoVAvit4DieXRVyqkPABHvYi0V8zxktEE4G776ZNKZBQTZnBS0Sbx+oVTGh OE24cX7t39La0+Lm48XX2zVGfBU0jEpD/mlnmLdoOp70CNn7IYdxF04bGAfMVhsuIjYi P4mhBxDBX1rfK0RjsmW17VsHRrH2PgTd5kUiFRfjFmRFzFy2qdue7PfrQOJ4WFFiW6Zo 23rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776842719; x=1777447519; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=de2O5WnQ8UemtO/3LhVBnJpF2XKAoQmu3IyJOxz+oMM=; b=ndZ3I+Rf+j7/CqvCUfHq+eXreVN7yVT0oi7o2HDE4IeoWyjs0+b27+I88OCX0ik42P F/xwT5cBqXR++0Lw6AALG/Si65CTz1Z1X1UlYubNC+6ILkBMrqjOM9wY+uH7hoE7PNvP /FyXS9OSHqCrSfVd6kvmxkOWIhO946NS99QzYV7OkMwzjaP3+FuXVg274XxdcVtgEcVO szqVD8LUdtlrcnjwfC0aqlEeh+vWJn8BdqlG+QlLnFNk59le3VpH3ZeZ6UVo3W74Ck8t CjO6NT0ovQaD1V7Q1UxUcEu9ZY5yIyiD0ZZ0mGBE08yVKzwykB4KL3dY/0HIYwSredWu 5cow== X-Gm-Message-State: AOJu0YycQu5ovYFJxHFJA4M4kR6KRU52eyxtXEPuzxguI6jkibMxs2A9 oCDB3r/KuvdXK6enVgjvqQi7PRKyq5sjDOAkelRr+FW/66G31Ts8iCeR X-Gm-Gg: AeBDietst24exMOCC1kZnswBaFAQVQ+TpSzP4aEe2PUiD1A1oUvFJE6gLHYvgScMQIG 2iC0s+TK+hOGsDtJCbGnDVaxj2ISO/5cO38wvaL1orO1xhhfD4mk/CzSbnvifEYjuXG+Mh/bfsd lc/zsiTLoGGLwWdtsFfF9jfN4nyZaqeHsmmx/H1wu+xTWGZ91CDCzunCyTaywIu2tj1aLJF6dZH ctT1z1I/jMAlrEK6hXQzJ7ap06Kcu+x9/s6kLq51EaKNL0zraVxbYTKWNKqkVTRnZDNZSpU8hPV 3Fi4CD3nFCJiUwVbYJ0Y0FmGdE5I7jLnnw00NfYQBGntpbS6F7wP1JsnINLiG6kCh1HYxqUcM+U DFEADPAmRPdROWt7XTnZjZLJIJtf3JITbWruWr+VLffGagw0l8tHhylRKkJ26aZqnmHgrHRpH/w CpqzzpfJGNnngC6r+wb/r/eWPhIMk1BkSs6V/viME1ArHYQ/5Zu5tP X-Received: by 2002:a05:6a00:4fcc:b0:824:a0b9:64ee with SMTP id d2e1a72fcca58-82f8c8344a4mr21649247b3a.17.1776842718842; Wed, 22 Apr 2026 00:25:18 -0700 (PDT) Received: from smtpclient.apple ([45.32.121.103]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82f8ebb3fa2sm16139315b3a.29.2026.04.22.00.25.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Apr 2026 00:25:17 -0700 (PDT) From: Chao Li Message-Id: <587E8A18-6331-4F1C-BDA7-915EE64D869A@gmail.com> Content-Type: multipart/mixed; boundary="Apple-Mail=_90B8CDAD-832F-40F8-A773-2F5E31A00E02" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: Cleanup shadows variable warnings, round 1 Date: Wed, 22 Apr 2026 15:24:37 +0800 In-Reply-To: Cc: Postgres hackers , Peter Eisentraut To: Peter Smith , =?utf-8?Q?=C3=81lvaro_Herrera?= , David Rowley References: <8B830174-7794-411F-B936-37DDB509EC5D@gmail.com> X-Mailer: Apple Mail (2.3864.400.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_90B8CDAD-832F-40F8-A773-2F5E31A00E02 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 22, 2026, at 14:32, Peter Smith wrote: >=20 > Hi Chao-San. >=20 > A couple of comments for your v1-0001 cleanup patch. Hi Peter, thank you very much for reviewing. >=20 > =3D=3D=3D=3D=3D=3D > src/bin/pg_dump/pg_dumpall.c >=20 > I guess you were just making the minimal changes, but I thought > parseDumpFormat could have been simplified more by removing that local > variable entirely. >=20 > BEFORE > if (pg_strcasecmp(format, "c") =3D=3D 0) > archFormat =3D archCustom; > else if (pg_strcasecmp(format, "custom") =3D=3D 0) > archFormat =3D archCustom; > else if (pg_strcasecmp(format, "d") =3D=3D 0) > archFormat =3D archDirectory; > else if (pg_strcasecmp(format, "directory") =3D=3D 0) > archFormat =3D archDirectory; > else if (pg_strcasecmp(format, "p") =3D=3D 0) > archFormat =3D archNull; > else if (pg_strcasecmp(format, "plain") =3D=3D 0) > archFormat =3D archNull; > else if (pg_strcasecmp(format, "t") =3D=3D 0) > archFormat =3D archTar; > else if (pg_strcasecmp(format, "tar") =3D=3D 0) > archFormat =3D archTar; >=20 > SUGGESTION > if (pg_strcasecmp(format, "c") =3D=3D 0 || > pg_strcasecmp(format, "custom") =3D=3D 0) > return archCustom; >=20 > if (pg_strcasecmp(format, "d") =3D=3D 0 || > pg_strcasecmp(format, "directory") =3D=3D 0) > return archDirectory; >=20 > if (pg_strcasecmp(format, "p") =3D=3D 0 || > pg_strcasecmp(format, "plain") =3D=3D 0) > return archNull; >=20 > if (pg_strcasecmp(format, "t") =3D=3D 0 || > pg_strcasecmp(format, "tar") =3D=3D 0) > return archTar; >=20 Yes, I was trying to keep the changes minimal. Consider that if we later = submit a trivial patch just to refactor this function as you suggested, = it might be hard to get it through the process. So, as touching the = code, it might make sense to do the refactoring now. Looks like ending a non-void function with pg_fatal() does not trigger a = compile warning. I also noticed that get_encoding_id() in initdb.c = returns int and has pg_fatal() as its last statement, which makes me = more comfortable doing this refactoring. > =3D=3D=3D=3D=3D=3D > src/bin/psql/describe.c >=20 > I know you were addressing only "new" issues, but it seemed a bit > strange to fix only this one when there was the same issue earlier > (~line 1780) in the same function. >=20 > if (tableinfo.relkind =3D=3D RELKIND_SEQUENCE) > { > PGresult *result =3D NULL; > printQueryOpt myopt =3D pset.popt; >=20 I also found that a bit odd, which is why I specially said in my = previous email: "I strictly limited it to warnings newly introduced in = v19, without touching any pre-existing ones, even where an old = occurrence is very close to a new one.=E2=80=9D So for this case, I=E2=80=99d prefer to hear David=E2=80=99s or = Alvaro=E2=80=99s view, since they asked to limit this to v19-only = occurrences. PFA v2: refactoring parseDumpFormat as Peter suggested. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/ --Apple-Mail=_90B8CDAD-832F-40F8-A773-2F5E31A00E02 Content-Disposition: attachment; filename=v2-0001-Cleanup-v19-introduced-shadow-variable-warnings.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="v2-0001-Cleanup-v19-introduced-shadow-variable-warnings.patch" Content-Transfer-Encoding: quoted-printable =46rom=20ba90cf5ce8dd34594234651bed461f26e5b7f99e=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20"Chao=20Li=20(Evan)"=20=0A= Date:=20Wed,=2022=20Apr=202026=2011:33:16=20+0800=0ASubject:=20[PATCH=20= v2]=20Cleanup=20v19=20introduced=20shadow-variable=20warnings=0A=0A= Suggested-by:=20David=20Rowley=20=0AAuthor:=20Chao=20= Li=20=0AReviewed-by:=20Peter=20Smith=20= =0AReviewed-by:=20Yuchen=20Li=20= =0ADiscussion:=20= https://postgr.es/m/CAEoWx2kQ2x5gMaj8tHLJ3=3DjfC+p5YXHkJyHrDTiQw2nn2FJTmQ@= mail.gmail.com=0A---=0A=20src/backend/commands/tablecmds.c=20=20=20=20=20= =20=20=20=20=20=20=20|=2028=20++++++-------=0A=20= src/backend/commands/wait.c=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20|=2012=20+++---=0A=20src/backend/postmaster/datachecksum_state.c=20|=20= =208=20++--=0A=20src/bin/pg_dump/pg_dumpall.c=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20|=2045=20+++++++++------------=0A=20= src/bin/psql/describe.c=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20|=2012=20+++---=0A=205=20files=20changed,=2050=20= insertions(+),=2055=20deletions(-)=0A=0Adiff=20--git=20= a/src/backend/commands/tablecmds.c=20b/src/backend/commands/tablecmds.c=0A= index=201068d7c7b6a..ec8207687c0=20100644=0A---=20= a/src/backend/commands/tablecmds.c=0A+++=20= b/src/backend/commands/tablecmds.c=0A@@=20-22610,7=20+22610,7=20@@=20= createTableConstraints(List=20**wqueue,=20AlteredTableInfo=20*tab,=0A=20=09= =09bool=09=09ccvalid=20=3D=20constr->check[ccnum].ccvalid;=0A=20=09=09= Node=09=20=20=20*ccbin_node;=0A=20=09=09bool=09=09found_whole_row;=0A-=09= =09Constraint=20*constr;=0A+=09=09Constraint=20*con;=0A=20=0A=20=09=09/*=0A= =20=09=09=20*=20The=20partitioned=20table=20can=20not=20have=20a=20NO=20= INHERIT=20check=20constraint=0A@@=20-22632,19=20+22632,19=20@@=20= createTableConstraints(List=20**wqueue,=20AlteredTableInfo=20*tab,=0A=20=09= =09=09=09=20ccname,=0A=20=09=09=09=09=20= RelationGetRelationName(parent_rel));=0A=20=0A-=09=09constr=20=3D=20= makeNode(Constraint);=0A-=09=09constr->contype=20=3D=20CONSTR_CHECK;=0A-=09= =09constr->conname=20=3D=20pstrdup(ccname);=0A-=09=09constr->deferrable=20= =3D=20false;=0A-=09=09constr->initdeferred=20=3D=20false;=0A-=09=09= constr->is_enforced=20=3D=20ccenforced;=0A-=09=09constr->skip_validation=20= =3D=20!ccvalid;=0A-=09=09constr->initially_valid=20=3D=20ccvalid;=0A-=09=09= constr->is_no_inherit=20=3D=20ccnoinherit;=0A-=09=09constr->raw_expr=20=3D= =20NULL;=0A-=09=09constr->cooked_expr=20=3D=20nodeToString(ccbin_node);=0A= -=09=09constr->location=20=3D=20-1;=0A-=09=09constraints=20=3D=20= lappend(constraints,=20constr);=0A+=09=09con=20=3D=20= makeNode(Constraint);=0A+=09=09con->contype=20=3D=20CONSTR_CHECK;=0A+=09=09= con->conname=20=3D=20pstrdup(ccname);=0A+=09=09con->deferrable=20=3D=20= false;=0A+=09=09con->initdeferred=20=3D=20false;=0A+=09=09= con->is_enforced=20=3D=20ccenforced;=0A+=09=09con->skip_validation=20=3D=20= !ccvalid;=0A+=09=09con->initially_valid=20=3D=20ccvalid;=0A+=09=09= con->is_no_inherit=20=3D=20ccnoinherit;=0A+=09=09con->raw_expr=20=3D=20= NULL;=0A+=09=09con->cooked_expr=20=3D=20nodeToString(ccbin_node);=0A+=09=09= con->location=20=3D=20-1;=0A+=09=09constraints=20=3D=20= lappend(constraints,=20con);=0A=20=09}=0A=20=0A=20=09/*=20Install=20all=20= CHECK=20constraints.=20*/=0Adiff=20--git=20a/src/backend/commands/wait.c=20= b/src/backend/commands/wait.c=0Aindex=20382d5c2d44f..7fe53a6f045=20= 100644=0A---=20a/src/backend/commands/wait.c=0A+++=20= b/src/backend/commands/wait.c=0A@@=20-92,7=20+92,7=20@@=20= ExecWaitStmt(ParseState=20*pstate,=20WaitStmt=20*stmt,=20bool=20= isTopLevel,=0A=20=09=09{=0A=20=09=09=09char=09=20=20=20*timeout_str;=0A=20= =09=09=09const=20char=20*hintmsg;=0A-=09=09=09double=09=09result;=0A+=09=09= =09double=09=09val;=0A=20=0A=20=09=09=09if=20(timeout_specified)=0A=20=09= =09=09=09errorConflictingDefElem(defel,=20pstate);=0A@@=20-100,7=20= +100,7=20@@=20ExecWaitStmt(ParseState=20*pstate,=20WaitStmt=20*stmt,=20= bool=20isTopLevel,=0A=20=0A=20=09=09=09timeout_str=20=3D=20= defGetString(defel);=0A=20=0A-=09=09=09if=20(!parse_real(timeout_str,=20= &result,=20GUC_UNIT_MS,=20&hintmsg))=0A+=09=09=09if=20= (!parse_real(timeout_str,=20&val,=20GUC_UNIT_MS,=20&hintmsg))=0A=20=09=09= =09{=0A=20=09=09=09=09ereport(ERROR,=0A=20=09=09=09=09=09=09= errcode(ERRCODE_INVALID_PARAMETER_VALUE),=0A@@=20-113,20=20+113,20=20@@=20= ExecWaitStmt(ParseState=20*pstate,=20WaitStmt=20*stmt,=20bool=20= isTopLevel,=0A=20=09=09=09=20*=20don't=20fail=20on=20just-out-of-range=20= values=20that=20would=20round=20into=0A=20=09=09=09=20*=20range.=0A=20=09= =09=09=20*/=0A-=09=09=09result=20=3D=20rint(result);=0A+=09=09=09val=20=3D= =20rint(val);=0A=20=0A=20=09=09=09/*=20Range=20check=20*/=0A-=09=09=09if=20= (unlikely(isnan(result)=20||=20!FLOAT8_FITS_IN_INT64(result)))=0A+=09=09=09= if=20(unlikely(isnan(val)=20||=20!FLOAT8_FITS_IN_INT64(val)))=0A=20=09=09= =09=09ereport(ERROR,=0A=20=09=09=09=09=09=09= errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),=0A=20=09=09=09=09=09=09= errmsg("timeout=20value=20is=20out=20of=20range"));=0A=20=0A-=09=09=09if=20= (result=20<=200)=0A+=09=09=09if=20(val=20<=200)=0A=20=09=09=09=09= ereport(ERROR,=0A=20=09=09=09=09=09=09= errcode(ERRCODE_INVALID_PARAMETER_VALUE),=0A=20=09=09=09=09=09=09= errmsg("timeout=20cannot=20be=20negative"));=0A=20=0A-=09=09=09timeout=20= =3D=20(int64)=20result;=0A+=09=09=09timeout=20=3D=20(int64)=20val;=0A=20=09= =09}=0A=20=09=09else=20if=20(strcmp(defel->defname,=20"no_throw")=20=3D=3D= =200)=0A=20=09=09{=0Adiff=20--git=20= a/src/backend/postmaster/datachecksum_state.c=20= b/src/backend/postmaster/datachecksum_state.c=0Aindex=20= b3e99170669..9f9a2f9c40e=20100644=0A---=20= a/src/backend/postmaster/datachecksum_state.c=0A+++=20= b/src/backend/postmaster/datachecksum_state.c=0A@@=20-546,7=20+546,7=20= @@=20StartDataChecksumsWorkerLauncher(DataChecksumsWorkerOperation=20op,=0A= =20{=0A=20=09BackgroundWorker=20bgw;=0A=20=09BackgroundWorkerHandle=20= *bgw_handle;=0A-=09bool=09=09launcher_running;=0A+=09bool=09=09= is_running;=0A=20=09DataChecksumsWorkerOperation=20launcher_running_op;=0A= =20=0A=20#ifdef=20USE_ASSERT_CHECKING=0A@@=20-565,8=20+565,8=20@@=20= StartDataChecksumsWorkerLauncher(DataChecksumsWorkerOperation=20op,=0A=20= =09DataChecksumState->launch_cost_limit=20=3D=20cost_limit;=0A=20=0A=20=09= /*=20Is=20the=20launcher=20already=20running?=20If=20so,=20what=20is=20= it=20doing?=20*/=0A-=09launcher_running=20=3D=20= DataChecksumState->launcher_running;=0A-=09if=20(launcher_running)=0A+=09= is_running=20=3D=20DataChecksumState->launcher_running;=0A+=09if=20= (is_running)=0A=20=09=09launcher_running_op=20=3D=20= DataChecksumState->operation;=0A=20=0A=20=09= LWLockRelease(DataChecksumsWorkerLock);=0A@@=20-589,7=20+589,7=20@@=20= StartDataChecksumsWorkerLauncher(DataChecksumsWorkerOperation=20op,=0A=20= =09=20*=20already=20in=20the=20desired=20state,=20i.e.=20if=20the=20= checksums=20are=20already=20enabled=0A=20=09=20*=20and=20you=20call=20= pg_enable_data_checksums().=0A=20=09=20*/=0A-=09if=20(!launcher_running)=0A= +=09if=20(!is_running)=0A=20=09{=0A=20=09=09/*=0A=20=09=09=20*=20Prepare=20= the=20BackgroundWorker=20and=20launch=20it.=0Adiff=20--git=20= a/src/bin/pg_dump/pg_dumpall.c=20b/src/bin/pg_dump/pg_dumpall.c=0Aindex=20= 9e904f76baa..ba780bd6c29=20100644=0A---=20a/src/bin/pg_dump/pg_dumpall.c=0A= +++=20b/src/bin/pg_dump/pg_dumpall.c=0A@@=20-83,7=20+83,7=20@@=20static=20= void=20buildShSecLabels(PGconn=20*conn,=0A=20=09=09=09=09=09=09=09=20= PQExpBuffer=20buffer);=0A=20static=20void=20executeCommand(PGconn=20= *conn,=20const=20char=20*query);=0A=20static=20void=20= check_for_invalid_global_names(PGconn=20*conn,=0A-=09=09=09=09=09=09=09=09= =09=09=20=20=20SimpleStringList=20*database_exclude_names);=0A+=09=09=09=09= =09=09=09=09=09=09=20=20=20SimpleStringList=20*db_exclude_names);=0A=20= static=20void=20expand_dbname_patterns(PGconn=20*conn,=20= SimpleStringList=20*patterns,=0A=20=09=09=09=09=09=09=09=09=20=20=20= SimpleStringList=20*names);=0A=20static=20void=20= read_dumpall_filters(const=20char=20*filename,=20SimpleStringList=20= *pattern);=0A@@=20-2269,7=20+2269,7=20@@=20executeCommand(PGconn=20= *conn,=20const=20char=20*query)=0A=20=20*/=0A=20static=20void=0A=20= check_for_invalid_global_names(PGconn=20*conn,=0A-=09=09=09=09=09=09=09=20= =20=20SimpleStringList=20*database_exclude_names)=0A+=09=09=09=09=09=09=09= =20=20=20SimpleStringList=20*db_exclude_names)=0A=20{=0A=20=09PGresult=20= =20=20*res;=0A=20=09int=09=09=09i;=0A@@=20-2296,7=20+2296,7=20@@=20= check_for_invalid_global_names(PGconn=20*conn,=0A=20=0A=20=09=09/*=20= Skip=20excluded=20databases=20since=20they=20won't=20be=20in=20map.dat=20= */=0A=20=09=09if=20(strcmp(objtype,=20"database")=20=3D=3D=200=20&&=0A-=09= =09=09simple_string_list_member(database_exclude_names,=20objname))=0A+=09= =09=09simple_string_list_member(db_exclude_names,=20objname))=0A=20=09=09= =09continue;=0A=20=0A=20=09=09if=20(strpbrk(objname,=20"\n\r"))=0A@@=20= -2406,29=20+2406,24=20@@=20read_dumpall_filters(const=20char=20= *filename,=20SimpleStringList=20*pattern)=0A=20static=20ArchiveFormat=0A=20= parseDumpFormat(const=20char=20*format)=0A=20{=0A-=09ArchiveFormat=20= archDumpFormat;=0A-=0A-=09if=20(pg_strcasecmp(format,=20"c")=20=3D=3D=20= 0)=0A-=09=09archDumpFormat=20=3D=20archCustom;=0A-=09else=20if=20= (pg_strcasecmp(format,=20"custom")=20=3D=3D=200)=0A-=09=09archDumpFormat=20= =3D=20archCustom;=0A-=09else=20if=20(pg_strcasecmp(format,=20"d")=20=3D=3D= =200)=0A-=09=09archDumpFormat=20=3D=20archDirectory;=0A-=09else=20if=20= (pg_strcasecmp(format,=20"directory")=20=3D=3D=200)=0A-=09=09= archDumpFormat=20=3D=20archDirectory;=0A-=09else=20if=20= (pg_strcasecmp(format,=20"p")=20=3D=3D=200)=0A-=09=09archDumpFormat=20=3D=20= archNull;=0A-=09else=20if=20(pg_strcasecmp(format,=20"plain")=20=3D=3D=20= 0)=0A-=09=09archDumpFormat=20=3D=20archNull;=0A-=09else=20if=20= (pg_strcasecmp(format,=20"t")=20=3D=3D=200)=0A-=09=09archDumpFormat=20=3D=20= archTar;=0A-=09else=20if=20(pg_strcasecmp(format,=20"tar")=20=3D=3D=200)=0A= -=09=09archDumpFormat=20=3D=20archTar;=0A-=09else=0A-=09=09= pg_fatal("unrecognized=20output=20format=20\"%s\";=20please=20specify=20= \"c\",=20\"d\",=20\"p\",=20or=20\"t\"",=0A-=09=09=09=09=20format);=0A+=09= if=20(pg_strcasecmp(format,=20"c")=20=3D=3D=200=20||=0A+=09=09= pg_strcasecmp(format,=20"custom")=20=3D=3D=200)=0A+=09=09return=20= archCustom;=0A+=0A+=09if=20(pg_strcasecmp(format,=20"d")=20=3D=3D=200=20= ||=0A+=09=09pg_strcasecmp(format,=20"directory")=20=3D=3D=200)=0A+=09=09= return=20archDirectory;=0A+=0A+=09if=20(pg_strcasecmp(format,=20"p")=20= =3D=3D=200=20||=0A+=09=09pg_strcasecmp(format,=20"plain")=20=3D=3D=200)=0A= +=09=09return=20archNull;=0A+=0A+=09if=20(pg_strcasecmp(format,=20"t")=20= =3D=3D=200=20||=0A+=09=09pg_strcasecmp(format,=20"tar")=20=3D=3D=200)=0A= +=09=09return=20archTar;=0A=20=0A-=09return=20archDumpFormat;=0A+=09= pg_fatal("unrecognized=20output=20format=20\"%s\";=20please=20specify=20= \"c\",=20\"d\",=20\"p\",=20or=20\"t\"",=0A+=09=09=09=20format);=0A=20}=0A= =20=0A=20/*=0Adiff=20--git=20a/src/bin/psql/describe.c=20= b/src/bin/psql/describe.c=0Aindex=20dd1179ef927..974dbc5ec2c=20100644=0A= ---=20a/src/bin/psql/describe.c=0A+++=20b/src/bin/psql/describe.c=0A@@=20= -1938,7=20+1938,7=20@@=20describeOneTableDetails(const=20char=20= *schemaname,=0A=20=09=20*/=0A=20=09if=20(tableinfo.relkind=20=3D=3D=20= RELKIND_PROPGRAPH)=0A=20=09{=0A-=09=09printQueryOpt=20myopt=20=3D=20= pset.popt;=0A+=09=09printQueryOpt=20mypopt=20=3D=20pset.popt;=0A=20=09=09= char=09=20=20=20*footers[3]=20=3D=20{NULL,=20NULL,=20NULL};=0A=20=0A=20=09= =09printfPQExpBuffer(&buf,=20"/*=20%s=20*/\n",=20_("Get=20property=20= graph=20information"));=0A@@=20-1993,12=20+1993,12=20@@=20= describeOneTableDetails(const=20char=20*schemaname,=0A=20=09=09=09}=0A=20= =09=09}=0A=20=0A-=09=09myopt.footers=20=3D=20footers;=0A-=09=09= myopt.topt.default_footer=20=3D=20false;=0A-=09=09myopt.title=20=3D=20= title.data;=0A-=09=09myopt.translate_header=20=3D=20true;=0A+=09=09= mypopt.footers=20=3D=20footers;=0A+=09=09mypopt.topt.default_footer=20=3D=20= false;=0A+=09=09mypopt.title=20=3D=20title.data;=0A+=09=09= mypopt.translate_header=20=3D=20true;=0A=20=0A-=09=09printQuery(res,=20= &myopt,=20pset.queryFout,=20false,=20pset.logfile);=0A+=09=09= printQuery(res,=20&mypopt,=20pset.queryFout,=20false,=20pset.logfile);=0A= =20=0A=20=09=09free(footers[0]);=0A=20=09=09free(footers[1]);=0A--=20=0A= 2.50.1=20(Apple=20Git-155)=0A=0A= --Apple-Mail=_90B8CDAD-832F-40F8-A773-2F5E31A00E02--