Guides you through the steps required to create user-defined functions, and to map those functions using a text editor.
Create user-defined functions
- At a UNIX terminal, navigate to the
FunctionEmulation.sql file, located in the
$COBDIR/demo/sql/hcopg/functionemulation directory.
This file contains a script that creates some user-defined math functions needed by the example code.
- Execute the following:
>psql -h DBInstanceEndpoint –p=Port –u=UserId -d HCO_Test -a -f functionemulation.sql
Map user-defined functions
- At your UNIX terminal or File window, open the
functionemulation.xml file in a text editor.
- Copy the contents of the
functionemulation.xml file.
- Navigate to and open the DialectMappings.hcomap file, located in the
$COBDIR/etc/hcopg folder.
- Insert the copied contents right before the end tag
</NameMappingDataSet> in the
DialectMappings.hcomap file and save.