aboutsummaryrefslogtreecommitdiffstats
path: root/sql/serenitas.c
diff options
context:
space:
mode:
Diffstat (limited to 'sql/serenitas.c')
-rw-r--r--sql/serenitas.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/serenitas.c b/sql/serenitas.c
index a85894ce..f21a55c3 100644
--- a/sql/serenitas.c
+++ b/sql/serenitas.c
@@ -157,6 +157,7 @@ Datum upfront_from_level(PG_FUNCTION_ARGS) {
if (SPI_connect() == SPI_ERROR_CONNECT) {
elog(ERROR, "something wrong happened");
}
+ elog(INFO, "pomme");
const text* redindexcode = PG_GETARG_TEXT_PP(0);
DateADT maturity = PG_GETARG_DATEADT(1);
float8 traded_level = PG_GETARG_FLOAT8(2);
@@ -194,6 +195,7 @@ Datum upfront_from_level(PG_FUNCTION_ARGS) {
SPI_finish();
elog(ERROR, "something wrong happened");
}
+ elog(INFO, "salut");
int16 curve_type = 532;
sql_query = "SELECT curve FROM rate_curves WHERE effective_date=$1 AND curve_type=$2";
argtypes[0] = DATEOID;
@@ -216,6 +218,7 @@ Datum upfront_from_level(PG_FUNCTION_ARGS) {
SPI_finish();
elog(ERROR, "no curve for that date");
} else {
+ elog(INFO, "poupou");
buf = DatumGetByteaPP(tmp);
uint32 data_length = VARSIZE_ANY(curve);
char *raw_data = VARDATA_ANY(curve);
@@ -227,6 +230,7 @@ Datum upfront_from_level(PG_FUNCTION_ARGS) {
SPI_finish();
elog(ERROR, "no curve for that date");
}
+ elog(INFO, "poire");
SPI_finish();
double recovery = 0.4;
double upfront;