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
ecpg.props
Description: XML document
<?xml version="1.0" encoding="utf-8"?> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" /> <AvailableItemName Include="Ecpg"> <Targets>EcpgTarget</Targets> </AvailableItemName> </ItemGroup> <UsingTask TaskName="Ecpg" TaskFactory="XamlTaskFactory" AssemblyName="Microsoft.Build.Tasks.v4.0"> <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task> </UsingTask> <Target Name="EcpgTarget" BeforeTargets="$(EcpgBeforeTargets)" AfterTargets="$(EcpgAfterTargets)" Condition="'@(Ecpg)' != ''" DependsOnTargets="$(EcpgDependsOn);ComputeEcpgOutput" Outputs="%(Ecpg.Outputs)" Inputs="%(Ecpg.Identity);%(Ecpg.AdditionalDependencies);$(MSBuildProjectFile)"> <ItemGroup Condition="'@(SelectedFiles)' != ''"> <Ecpg Remove="@(Ecpg)" Condition="'%(Identity)' != '@(SelectedFiles)'" /> </ItemGroup> <ItemGroup> <Ecpg_tlog Include="%(Ecpg.Outputs)" Condition="'%(Ecpg.Outputs)' != '' and '%(Ecpg.ExcludedFromBuild)' != 'true'"> <Source>@(Ecpg, '|')</Source> </Ecpg_tlog> </ItemGroup> <Message Importance="High" Text="%(Ecpg.ExecutionDescription)" /> <WriteLinesToFile Condition="'@(Ecpg_tlog)' != '' and '%(Ecpg_tlog.ExcludedFromBuild)' != 'true'" File="$(IntDir)$(ProjectName).write.1.tlog" Lines="^%(Ecpg_tlog.Source);@(Ecpg_tlog->'%(Fullpath)')" /> <Ecpg Condition="'@(Ecpg)' != '' and '%(Ecpg.ExcludedFromBuild)' != 'true'" CommandLineTemplate="%(Ecpg.CommandLineTemplate)" OutputFile="%(Ecpg.OutputFile)" Define="%(Ecpg.Define)" Verbose="%(Ecpg.Verbose)" Include="%(Ecpg.Include)" AutoCommit="%(Ecpg.AutoCommit)" ParseSystemInclude="%(Ecpg.ParseSystemInclude)" AutoCode="%(Ecpg.AutoCode)" RunTime="%(Ecpg.RunTime)" CompatibilityMode="%(Ecpg.CompatibilityMode)" AdditionalOptions="%(Ecpg.AdditionalOptions)" Inputs="%(Ecpg.Identity)" /> </Target> <PropertyGroup> <ComputeLinkInputsTargets> $(ComputeLinkInputsTargets); ComputeEcpgOutput; </ComputeLinkInputsTargets> <ComputeLibInputsTargets> $(ComputeLibInputsTargets); ComputeEcpgOutput; </ComputeLibInputsTargets> </PropertyGroup> <Target Name="ComputeEcpgOutput" Condition="'@(Ecpg)' != ''"> <ItemGroup> <EcpgDirsToMake Condition="'@(Ecpg)' != '' and '%(Ecpg.ExcludedFromBuild)' != 'true'" Include="%(Ecpg.Outputs)" /> <Link Include="%(EcpgDirsToMake.Identity)" Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" /> <Lib Include="%(EcpgDirsToMake.Identity)" Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" /> <ImpLib Include="%(EcpgDirsToMake.Identity)" Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" /> </ItemGroup> <MakeDir Directories="@(EcpgDirsToMake->'%(RootDir)%(Directory)')" /> </Target> </Project>
<?xml version="1.0" encoding="utf-8"?> <ProjectSchemaDefinitions xmlns="clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:transformCallback="Microsoft.Cpp.Dev10.ConvertPropertyCallback"> <Rule Name="Ecpg" PageTemplate="tool" DisplayName="Ecpg" SwitchPrefix="-" Order="200"> <Rule.DataSource> <DataSource Persistence="ProjectFile" ItemType="Ecpg" /> </Rule.DataSource> <Rule.Categories> <Category Name="General"> <Category.DisplayName> <sys:String>General</sys:String> </Category.DisplayName> </Category> <Category Name="Ecpg Options"> <Category.DisplayName> <sys:String>Ecpg Options</sys:String> </Category.DisplayName> </Category> <Category Name="Command Line" Subtype="CommandLine"> <Category.DisplayName> <sys:String>Command Line</sys:String> </Category.DisplayName> </Category> </Rule.Categories> <StringListProperty Name="OutputFile" Category="Ecpg Options" IsRequired="true" HelpUrl="https://www.postgresql.org/docs/9.5/static/app-ecpg.html" DisplayName="Output File Name" Description="Specifies that ecpg should write all its output to the given filename" Switch="o [value]" /> <StringListProperty Name="Define" Category="Ecpg Options" DisplayName="Define" IsRequired="false" HelpUrl="https://www.postgresql.org/docs/9.5/static/app-ecpg.html" Description="Define a C preprocessor symbol." Switch="D [value]" /> <StringListProperty Name="Include" Category="Ecpg Options" DisplayName="Include" IsRequired="false" HelpUrl="https://www.postgresql.org/docs/9.5/static/app-ecpg.html" Description="Specify an additional include path, used to find files included via EXEC SQL INCLUDE. Defaults are . (current directory), /usr/local/include, the PostgreSQL include directory which is defined at compile time (default: /usr/local/pgsql/include), and /usr/include, in that order." Switch="D [value]" /> <BoolProperty Name="Verbose" Category="Ecpg Options" DisplayName="Verbose" Description="Print additional information including the version and the 'include' path." HelpUrl="https://www.gnu.org/software/ecpg/manual/html_node/Understanding.html#Understanding" Switch="v" /> <BoolProperty Name="AutoCommit" Category="Ecpg Options" DisplayName="AutoCommit" Description="Turn on autocommit of transactions. In this mode, each SQL command is automatically committed unless it is inside an explicit transaction block. In the default mode, commands are committed only when EXEC SQL COMMIT is issued." HelpUrl="https://www.postgresql.org/docs/9.5/static/app-ecpg.html" Switch="t" /> <BoolProperty Name="AutoCode" Category="Ecpg Options" DisplayName="AutoCode" Description="Automatically generate certain C code from SQL code. Currently, this works for EXEC SQL TYPE." HelpUrl="https://www.postgresql.org/docs/9.5/static/app-ecpg.html" Switch="c" /> <BoolProperty Name="ParseSystemInclude" Category="Ecpg Options" DisplayName="ParseSystemInclude" Description="Parse system include files as well." HelpUrl="https://www.postgresql.org/docs/9.5/static/app-ecpg.html" Switch="i" /> <EnumProperty Name="RunTime" Category="Ecpg Options" HelpUrl="https://www.postgresql.org/docs/9.5/static/app-ecpg.html" DisplayName="RunTime" Description="Selects run-time behavior. Option can be one of the following: no_indicator: Do not use indicators but instead use special values to represent null values. Historically there have been databases using this approach. prepare: Prepare all statements before using them. Libecpg will keep a cache of prepared statements and reuse a statement if it gets executed again. If the cache runs full, libecpg will free the least used statement. questionmarks: Allow question mark as placeholder for compatibility reasons. This used to be the default long ago."> <EnumValue Name="no_indicator" DisplayName="no_indicator" Switch="r no_indicator"/> <EnumValue Name="prepare" DisplayName="prepare" Switch="r prepare"/> <EnumValue Name="questionmarks" DisplayName="questionmarks" Switch="r questionmarks"/> </EnumProperty> <EnumProperty Name="CompatibilityMode" Category="Ecpg Options" HelpUrl="https://www.postgresql.org/docs/9.5/static/app-ecpg.html" DisplayName="CompatibilityMode" Description="Set a compatibility mode. mode can be INFORMIX or INFORMIX_SE."> <EnumValue Name="INFORMIX " DisplayName="INFORMIX " Switch="C INFORMIX "/> <EnumValue Name="INFORMIX_SE" DisplayName="INFORMIX_SE" Switch="C INFORMIX_SE"/> </EnumProperty> <StringListProperty Name="Inputs" Category="Command Line" IsRequired="true" Switch=" "> <StringListProperty.DataSource> <DataSource Persistence="ProjectFile" ItemType="Ecpg" SourceType="Item" /> </StringListProperty.DataSource> </StringListProperty> <StringProperty Name="CommandLineTemplate" DisplayName="Command Line" Visible="False" IncludeInCommandLine="False" /> <DynamicEnumProperty Name="EcpgBeforeTargets" Category="General" EnumProvider="Targets" IncludeInCommandLine="False"> <DynamicEnumProperty.DisplayName> <sys:String>Execute Before</sys:String> </DynamicEnumProperty.DisplayName> <DynamicEnumProperty.Description> <sys:String>Specifies the targets for the build customization to run before.</sys:String> </DynamicEnumProperty.Description> <DynamicEnumProperty.ProviderSettings> <NameValuePair Name="Exclude" Value="^EcpgBeforeTargets|^Compute" /> </DynamicEnumProperty.ProviderSettings> <DynamicEnumProperty.DataSource> <DataSource Persistence="ProjectFile" HasConfigurationCondition="true" /> </DynamicEnumProperty.DataSource> </DynamicEnumProperty> <DynamicEnumProperty Name="EcpgAfterTargets" Category="General" EnumProvider="Targets" IncludeInCommandLine="False"> <DynamicEnumProperty.DisplayName> <sys:String>Execute After</sys:String> </DynamicEnumProperty.DisplayName> <DynamicEnumProperty.Description> <sys:String>Specifies the targets for the build customization to run after.</sys:String> </DynamicEnumProperty.Description> <DynamicEnumProperty.ProviderSettings> <NameValuePair Name="Exclude" Value="^EcpgAfterTargets|^Compute" /> </DynamicEnumProperty.ProviderSettings> <DynamicEnumProperty.DataSource> <DataSource Persistence="ProjectFile" ItemType="" HasConfigurationCondition="true" /> </DynamicEnumProperty.DataSource> </DynamicEnumProperty> <StringListProperty Name="Outputs" DisplayName="Outputs" Visible="False" IncludeInCommandLine="False" /> <StringProperty Name="ExecutionDescription" DisplayName="Execution Description" Visible="False" IncludeInCommandLine="False" /> <StringListProperty Name="AdditionalDependencies" DisplayName="Additional Dependencies" IncludeInCommandLine="False" Visible="false" /> <StringProperty Subtype="AdditionalOptions" Name="AdditionalOptions" Category="Command Line"> <StringProperty.DisplayName> <sys:String>Additional Options</sys:String> </StringProperty.DisplayName> <StringProperty.Description> <sys:String>Additional Options</sys:String> </StringProperty.Description> </StringProperty> </Rule> <ItemType Name="Ecpg" DisplayName="Ecpg" /> <FileExtension Name="*.pgc" ContentType="Ecpg" /> <ContentType Name="Ecpg" DisplayName="Ecpg" ItemType="Ecpg" /> </ProjectSchemaDefinitions>
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers