Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aHCQJ-00075P-VW for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jan 2016 15:24:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aHCQJ-0007QL-IH for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jan 2016 15:24:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aHCQI-0007Ls-7P for pgsql-hackers@postgresql.org; Thu, 07 Jan 2016 15:24:22 +0000 Received: from mail-by2on0058.outbound.protection.outlook.com ([207.46.100.58] helo=na01-by2-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aHCQC-0006rq-RA for pgsql-hackers@postgresql.org; Thu, 07 Jan 2016 15:24:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=BlueTreble.onmicrosoft.com; s=selector1-bluetreble-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Bs1DA9DuwMGx/cxdJf/zWTqcL42Foq9m8jkz7f4VRlA=; b=Ujkm9+N3Y7lJYXzynw5C9Z5yy/u9z9VsJhX2KYdlhQD8wxGXWGdLzgEo1jy6hqfMJkCLllsG3d4R7RMMjEE2lMziwhO6tOAHnA/ih8DR5gswk6oOcGqa1z/62HKQSO9TXWE3ZVhP2mKqyQaVvfhj93nCRcESvbMp5RYM0R9LnRU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jim.Nasby@bluetreble.com; Received: from decina.local (70.113.16.71) by BY2PR11MB0678.namprd11.prod.outlook.com (10.163.111.20) with Microsoft SMTP Server (TLS) id 15.1.361.13; Thu, 7 Jan 2016 15:24:12 +0000 Subject: Re: Very confusing installcheck behavior with PGXS To: Tom Lane References: <56899F36.9000607@BlueTreble.com> <5651.1452102882@sss.pgh.pa.us> <568E7829.2050805@BlueTreble.com> <12108.1452178021@sss.pgh.pa.us> <568E7B4A.4080003@BlueTreble.com> <13036.1452179541@sss.pgh.pa.us> CC: Peter Eisentraut , Robert Haas , Pg Hackers From: Jim Nasby Message-ID: <568E8317.3000806@BlueTreble.com> Date: Thu, 7 Jan 2016 09:24:07 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <13036.1452179541@sss.pgh.pa.us> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [70.113.16.71] X-ClientProxiedBy: BLUPR11CA0008.namprd11.prod.outlook.com (10.141.240.18) To BY2PR11MB0678.namprd11.prod.outlook.com (25.163.111.20) X-Microsoft-Exchange-Diagnostics: 1; BY2PR11MB0678; 2:dDCKNSx+HfnOebi+CtC1nPvo8mIkPcwy9Y1bFlC4RFWzVhovaBMcF14VsY/49vbV12agGSoJluOX47WwmXaxzVE5JDAIvHr8naqwUT51T6UGuJX9tADUq5JZklzUywgFCENRg8dT/7vmyRydjgoPPQ==; 3:fMeFDhyTD0BOYMT5F2x0AQd7+0sc43zDcFiYticLL//dv8zJivoCfd1w5NqsNGldXe/lmKkUtQnxL/ORuNs3wDI3Vlaj6y7WTsvU55z+U0aAXXddKwxVGpDpLNtjm2Hh; 25:/OTVVwdqubpLbtFL02RE5UfAukPBoP6APbxx87TFFHqN5wR/QS4pHRlAWnOVl9n1/EQeiOycaKuwEDok8lW+nmPzH0juBe4rj7kD0Y6fQDEAAB5h21FfdJRk05d6KGQtafZC+KyP0VInMCUN1AJgHG+UTOxWErmvk1lhun5Clc87nR4qIjpC5fSiYxBzA1PSqMaLMEge7hTKcfnHXohXfNTwsyPGLV5Tl63s0FU6jvQCaZwyV5hEtdWY2PFLAr3Y; 20:K5TZBysPOBBKjD2gPdlx4972Hrg8M1UhmqvCxTchwMdHxyz21geWFRpOw4ZM5I94iBhsREdSh1Z2yRdnZq/TeR0OX09PDomPcJ0l4+B4Z3pRdv15KqCpxrLasTOis1WZwcHxlz81QmbsU7jvsLreVlnOMxbWaBbyrJHXoHTBxX4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR11MB0678; X-MS-Office365-Filtering-Correlation-Id: f4ddac43-b98b-45cb-e338-08d3177698fd X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(10201501046); SRVR:BY2PR11MB0678; BCL:0; PCL:0; RULEID:; SRVR:BY2PR11MB0678; X-Microsoft-Exchange-Diagnostics: 1; BY2PR11MB0678; 4:HWupSrdZOvtxF1WRQj9dr0sYzzSG7zSA6UWmWO67UO2QjcGTjlaOExdYNAgjEmQxrVirmdRGbxl/Y7il/fntjTAjBVHg+yeTm6VJ/uQpuxyG7KQMQesCLWn5Bm+sogvShuXmDCSJKH2vKgtrDYI/dT32oy9+GgL0zzVmx75VFoaIV6fOuoJwXkLURidLP61MVf6v6839QlQqCK4krzhrmujGfoObgkzHas14WZ8wrAa7DDuTTnD72X3v+MpOFFp9dmHs3oDNZss+fnw9B4jnbEuTmNT8Rh3+QSkwkGSApaOJ8eZfMcfR9berf3hs1FLEmWPeiAFWivSE0AwLLsDI9XYSBS1EP/JyFsyaW7dy0k1ymPrC5p/6xjFtFpyvwQ4+ X-Forefront-PRVS: 0814A2C7A3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(479174004)(24454002)(199003)(189002)(377454003)(87266999)(33656002)(230700001)(76176999)(110136002)(65816999)(65806001)(5004730100002)(5001960100002)(40100003)(4001350100001)(97736004)(80316001)(3846002)(1096002)(23746002)(586003)(42186005)(36756003)(101416001)(54356999)(64126003)(189998001)(2950100001)(122386002)(105586002)(65956001)(5008740100001)(81156007)(87976001)(4326007)(66066001)(106356001)(50466002)(15975445007)(83506001)(19580395003)(92566002)(50986999)(19580405001)(6116002)(47776003)(59896002)(86362001)(77096005)(93886004)(2906002)(85282002)(336755003)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR11MB0678; H:decina.local; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: bluetreble.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BY2PR11MB0678; 23:ej6s/xZGc5wnRixWmQL+gykoW20/ANpKKiBYj?= =?Windows-1252?Q?sJto1H0OoydEt/w0y5CZ1+wCjTHYPWJrOrn8GvzJ1NFQh2dsdYb1zQgC?= =?Windows-1252?Q?LC7+qRuxiTkSTOdZ3+eL1XgDo8cVu2YtXHqWXiBlWZAnQV25ka/0Pl0Z?= =?Windows-1252?Q?CFsXzB4uHgMojrJ1GFXJeDITQeTp9mzr8fYCoCWweKVfcIH6Q5QB47hv?= =?Windows-1252?Q?aTwP86p2yca1K34PNOM0oo4NIKfFCwysi+uBgqqXl96Lg9nDy4BEL/k2?= =?Windows-1252?Q?BivSl7gjFGfj0HycXnEs5tiz5tbcZecmOQiNEq32N1k+P2U5rhB8SSAK?= =?Windows-1252?Q?oQsqWbbIq+exOg3s+BNVWn7B7YtZTOZd6KvdbMELGVic+XBCmpKwtghc?= =?Windows-1252?Q?1Pf6omymsu5XUYCg3rtCVX+qSTia+AufGNpmR5pUUOHkmNAhawAQ3xU3?= =?Windows-1252?Q?+4JQh1kDUQORSZlU98w50BS0cTnE9WUj1ZOAtM0Qgg3Ri/OnoYiC9FVy?= =?Windows-1252?Q?fQnl+bUdKgaVcw2OExotQh+im3u5YlEzHX5ShJ5TCDXCTXT4ToLaiBxO?= =?Windows-1252?Q?4tvhXoWxNGsikXMwJgKvw2VUBTuwk9RevgDmhIZ9ht5SxwO1aVNk8Ogi?= =?Windows-1252?Q?reUI8EMMeRsSGcpSOclXndQCgUd2mM1Ndmn58ipD2rlVqwvRrMWwrFXC?= =?Windows-1252?Q?DOLJ5qdB2nr0oBDtk72fqJcv5lQb7aoRVKScbooQcxiw7ToCKIEOj01c?= =?Windows-1252?Q?QyeZw9yHHVdpWdpxgGpMtd7etGlDK6QKUawOF501Dh95KlEMbhoktPCZ?= =?Windows-1252?Q?c86vv5W/r1Liik7n6iQwy8Ta0pfZsuh/5YIRmJX4Ab/nZ6gq9LJ96ar+?= =?Windows-1252?Q?8LcmvBB4z04uhh530Ja96ZX5fKjVANewMgaOSa0QHr9w4XtpjBS0RNxF?= =?Windows-1252?Q?8hoG8mPe4AnEGEihY4tthSRc3T+1VeRFGZCePkZjOA+cCKH19rCZg7N3?= =?Windows-1252?Q?G8XfWAwUVMO6ZP0tuTx8UNooX/7C2Pyf2fKmkfgCbD4CtCM/vac3INVY?= =?Windows-1252?Q?QmzCAYIB68fRDLDPV3+XHzMzAjwk1ndbjZSzWq//AAo/DJX6GF+AR2jW?= =?Windows-1252?Q?1Pi/WN6BWOjIQAXCnbBA8KLILKzrwwNKCQctSNX64uuKTOPOwz0dUzKz?= =?Windows-1252?Q?Uf9vLCrcaZHk663vDMQt3iRScjTjKCO+OT6FISFZnNTzWGPzZKNdXRsn?= =?Windows-1252?Q?L9n/hCDgNFTej4UM334S9OQyJGVDuuJdOxFVkl4wJE87LOGitbEcEU7S?= =?Windows-1252?Q?L3Ea0AxWBPRA/BaM86xRFGphbHHCzhizrcenxU/nWoiEN5eb6UiVQ0II?= =?Windows-1252?Q?vGDakvxbZWV23cTh/N++c83HYf/tK7SuInsD+nEj1bGRV1zpQdOILggD?= =?Windows-1252?Q?Se41XNXGSkc2lR/XWx4qK4QM5boD6jIpj6B1hfYJkuDr9ucMOYKmlT4a?= =?Windows-1252?Q?keFBKRxdilM4n62Zf0Q7eSwBryOD21QVmXTeUgczzzcYYG89A=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR11MB0678; 5:BS2v+B9x15+5OaEHlwQtHRy7LYkKVFu+gyZ3FB2dPec06atZzDFlwcxexaXPYEAkY9utDLB15lmDACaif/1msvtbl1tXl+rRA27uBuzlVUEPl5KT+apUh3fLNUR6ls/OQ6SpllJYMlhHAWI0pgS9Cw==; 24:trTt9e0yL4jD8jjAhyhMTEJy4QFEZDjCpIIZmNLPKmiCRh5iMqx8zu0ACWUrpPeOOUYc2kPEhp3xniXQ2I4b+Bpq8MBZ1/onQNtox5Jnr2Y= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: bluetreble.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2016 15:24:12.2851 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR11MB0678 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 1/7/16 9:12 AM, Tom Lane wrote: > Jim Nasby writes: >> On 1/7/16 8:47 AM, Tom Lane wrote: >>> That's pretty hard to believe. There's nothing in pg_regress that looks >>> in places other than the given --inputdir. > >> Actually, I think it does... from pg_regress_main.c: > >> /* >> * Look for files in the output dir first, consistent with a vpath search. >> * This is mainly to create more reasonable error messages if the file is >> * not found. It also allows local test overrides when running pg_regress >> * outside of the source tree. >> */ >> snprintf(infile, sizeof(infile), "%s/sql/%s.sql", >> outputdir, testname); >> if (!file_exists(infile)) >> snprintf(infile, sizeof(infile), "%s/sql/%s.sql", >> inputdir, testname); > > Oh, I'd just been looking in pg_regress.c. > > The comment's argument about "more reasonable error messages" seems pretty > dubious to me. The real reason for this behavior seems to have been to > simplify VPATH builds --- see commit feae7856, which added this code, > and was able to get rid of quite a lot of makefile cruft. > > I think though that doing it exactly like this is a bit klugy. A better > implementation of VPATH would've been to introduce an optional "secondary > input directory" into which we look if we fail to find something in the > main input directory. Then we'd run it with main input directory in the > build tree and secondary input directory pointing to the source tree. Seems reasonable. Sounds like a good beginner project to boot. :) > (I'm also wondering how convert_sourcefiles() works at all in a vpath > build, considering that I don't see it doing anything like this ...) It's only looking at outputdir, which I suspect is never ambiguous. -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers