Обсуждение: [HACKERS] [Proposal]: Extends VisualStudio to automatically precompileEmbeddedSQL
Hi I made an extension of VisualStudio that precompiles automaticaly C or C++ source with PostgreSQL Embedded SQL. The extension is made of the 3 files joined and I have no idea where they should be placed in the PostgreSQL source tree. Anybody interested in pushing this extension? zos -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Вложения
Re: [HACKERS] [Proposal]: Extends VisualStudio to automaticallyprecompile EmbeddedSQL
От
Michael Paquier
Дата:
On Tue, May 2, 2017 at 6:35 PM, zosrothko <zosrothko@orange.fr> wrote: > Hi > > I made an extension of VisualStudio that precompiles automaticaly C or > C++ source with PostgreSQL Embedded SQL. The extension is made of the 3 > files joined and I have no idea where they should be placed in the > PostgreSQL source tree. > > Anybody interested in pushing this extension? The PostgreSQL uses a set of scripts in src/tools/msvc/ to generate things compiled with visual studio, so instinctively you would be looking at working on that. Honestly, just by looking at the files you are proposing, it is hard to make an idea of why this would be useful for ECPG, and please note as well that there are guidelines for submitting patches: https://wiki.postgresql.org/wiki/Submitting_a_Patch The source code of ecpg is located in src/interfaces/ecpg by the way. If you are interested to work on it, that's the place where to look at first. -- Michael
Le 02/05/2017 à 13:22, Michael Paquier a écrit : > The PostgreSQL uses a set of scripts in src/tools/msvc/ to generate > things compiled with visual studio, so instinctively you would be > looking at working on that. Honestly, just by looking at the files you > are proposing, it is hard to make an idea of why this would be useful > for ECPG, and please note as well that there are guidelines for > submitting patches: > https://wiki.postgresql.org/wiki/Submitting_a_Patch Please find below a log of building a VS2017 project named PGembeddedSQL using the joined ECPG extension. Building the PGEmbeddedSQL.vcxproj with msbuild calls automatically the ecpg precompiler to precompile the PGEmbeddedSQL.pgc source and produces PGembeddedSQL.cxx, which in turn is compiled and linked to produce de PGembeddedSQL.exe C:\MXW\Clients\PagesJaunes\SQLDynamic\SQLDynamic>dirLe volume dans le lecteur C n'a pas de nom.Le numéro de série du volumeest 6FAB-AFA0 Répertoire de C:\MXW\Clients\PagesJaunes\SQLDynamic\SQLDynamic 02/05/2017 14:08 <REP> . 02/05/2017 14:08 <REP> .. 27/04/2017 17:11 <REP> Debug 27/04/2017 15:28 2 648 PGEmbeddedSQL.pgc 27/04/2017 15:13 9 557 PGEmbeddedSQL.vcxproj 27/04/2017 15:10 1 302 PGEmbeddedSQL.vcxproj.filters 27/04/2017 15:13 682 PGEmbeddedSQL.vcxproj.user C:\MXW\Clients\PagesJaunes\SQLDynamic\SQLDynamic>msbuild PGEmbeddedSQL.vcxproj Microsoft (R) Build Engine, version 15.1.548.43366 Copyright (C) Microsoft Corporation. Tous droits réservés. La génération a démarré 02/05/2017 14:09:56. Projet "C:\MXW\Clients\PagesJaunes\SQLDynamic\SQLDynamic\PGEmbeddedSQL.vcxproj" sur le noud 1 (cibl es par défaut). InitializeBuildStatus: Création de "C:\temp\postgres\Debug\PGEmbeddedSQL.tlog\unsuccessfulbuild", car "AlwaysCreate" a é té spécifié. EcpgTarget: Process "PGEmbeddedSQL.pgc" ecpg file cmd.exe /C "C:\Users\FrancisANDRE\AppData\Local\Temp\tmpfdb390c096f443e5b56d9ee962f8dafd.cmd" ecpg.exe -o PGEmbeddedSQL.cxx PGEmbeddedSQL.pgc ClCompile: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /ZI /nologo /W3 /WX- /Od /Oy - /D WIN32 /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc: wchar_t /Zc:forScope /Zc:inline /GR /Fo"C:\temp\postgres\Debug\\" /Fd"C:\temp\postgres\Debug\vc14 0.pdb" /Gd /TP /analyze- /errorReport:queue PGEmbeddedSQL.cxx PGEmbeddedSQL.cxx Link: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"C:\t emp\postgres\PGEmbeddedSQLd.exe" /INCREMENTAL /NOLOGO libecpg.lib libpq.lib kernel32.lib user32.l ib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib o dbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib s hell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level= 'asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\temp\postgres\PGEmbeddedSQLd.pdb" / SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\temp\postgres\PGEmbeddedSQLd.lib" / MACHINE:X86 C:\temp\postgres\Debug\PGEmbeddedSQL.obj PGEmbeddedSQL.vcxproj-> C:\temp\postgres\PGEmbeddedSQLd.exe PGEmbeddedSQL.vcxproj -> C:\temp\postgres\PGEmbeddedSQLd.pdb(Full PDB) FinalizeBuildStatus: Suppression du fichier "C:\temp\postgres\Debug\PGEmbeddedSQL.tlog\unsuccessfulbuild". Mise à jour de l'horodatage "C:\temp\postgres\Debug\PGEmbeddedSQL.tlog\PGEmbeddedSQL.lastbuildsta te". Génération du projet "C:\MXW\Clients\PagesJaunes\SQLDynamic\SQLDynamic\PGEmbeddedSQL.vcxproj" termi née (cibles par défaut). La génération a réussi. 0 Avertissement(s) 0 Erreur(s) Temps écoulé 00:00:02.63 Without the extension, you would have to precompile the PGembeddedSQL.pcg by hand HTH Francis > > The source code of ecpg is located in src/interfaces/ecpg by the way. > If you are interested to work on it, that's the place where to look at > first.
Re: [HACKERS] [Proposal]: Extends VisualStudio to automaticallyprecompile EmbeddedSQL
От
Francis ANDRE
Дата:
Le 02/05/2017 à 13:22, Michael Paquier a écrit :
I need to add those three files in the installation process. Where should go those files?On Tue, May 2, 2017 at 6:35 PM, zosrothko <zosrothko@orange.fr> wrote:Hi I made an extension of VisualStudio that precompiles automaticaly C or C++ source with PostgreSQL Embedded SQL. The extension is made of the 3 files joined and I have no idea where they should be placed in the PostgreSQL source tree. Anybody interested in pushing this extension?The PostgreSQL uses a set of scripts in src/tools/msvc/ to generate things compiled with visual studio, so instinctively you would be looking at working on that. Honestly, just by looking at the files you are proposing, it is hard to make an idea of why this would be useful for ECPG, and please note as well that there are guidelines for submitting patches: https://wiki.postgresql.org/wiki/Submitting_a_Patch The source code of ecpg is located in src/interfaces/ecpg by the way. If you are interested to work on it, that's the place where to look at first.
- in C:\Program Files (x86)\PostgreSQL\9.5\bin
- or should I put those files in a share/contrib directory?
FA
Le 02/05/2017 à 13:22, Michael Paquier a écrit :
I need to add those three files in the distribution process for Windows. Where should go those files?On Tue, May 2, 2017 at 6:35 PM, zosrothko <zosrothko@orange.fr> wrote:Hi I made an extension of VisualStudio that precompiles automaticaly C or C++ source with PostgreSQL Embedded SQL. The extension is made of the 3 files joined and I have no idea where they should be placed in the PostgreSQL source tree. Anybody interested in pushing this extension?The PostgreSQL uses a set of scripts in src/tools/msvc/ to generate things compiled with visual studio, so instinctively you would be looking at working on that. Honestly, just by looking at the files you are proposing, it is hard to make an idea of why this would be useful for ECPG, and please note as well that there are guidelines for submitting patches: https://wiki.postgresql.org/wiki/Submitting_a_Patch The source code of ecpg is located in src/interfaces/ecpg by the way. If you are interested to work on it, that's the place where to look at first.
- in C:\Program Files (x86)\PostgreSQL\9.5\bin
- or should I put those files in a share/contrib directory?
Zos