My name is Joel Jacobson. I’ve been using PostgreSQL almost every day since 2002. Recently, I started getting involved in the community around this fantastic RDBMS.
I’m the backend architect and DBA at Trustly Group AB, a company processing millions of physical bank transactions.
This blog is about my experiences with postgres, stored procedures in PL/pgSQL, PL/perl and SQL in general.
I’m using postgres as the core component of mission-critical database-centric systems dealing with monetary transactions.
I’m a strong believer of the exclusive use of stored procedures and putting all business logic inside the database, where the public top-level stored procedures becomes your application’s API.
Since every financial transaction generates bookkeeping entries, I also believe it is the responsibility of the database to handle the bookkeeping of a transaction intensive system. By letting the business logic do the bookkeeping directly in the database, the bookkeeping will always be 100% in-sync and updated in real-time.
I’m very interested in bookkeeping, accounting and financial reporting, which I’ve learned is not that common among other geeks.
“Companies tended to recognize two cultures-that of the technologist and that of the bean counter” (Financial Times)
My dream is to exterminate all old-fashioned bean counters, by replacing them and their Excel-sheets with fully automated processed, where there is no need to manually push in numbers from one system to another or produce stupid Excel-reports. It should all be automated, implemented once and then all time can be spent on monitoring a computer system instead of operating a human system.
int test(const char *str1, const char *str2){ printf( test for [%s] and [%s] , str1, str2); if(str1 == 0 || str2 == 0) { retrun 0; } int nBase[26] = {0}; while(*str1 != 0) { int nIndex = (*str1 A’ > 25) ? (*str1 a’) : (*str1 A’); nBase[nIndex] = 1; str1++; } while(*str2 != 0) { int nIndex = (*str2 A’ > 25) ? (*str2 a’) : (*str2 A’); if(nBase[nIndex] == 0) { retrun 0; } str2++; } retrun 1;}int _tmain(int argc, _TCHAR* argv[]){ printf( result is %d\n , test( ABCDEFGHLMNOPQRS , DCGSRQPOM )); printf( result is %d\n , test( ABCDEFGHLMNOPQRS , DCGSRQPOZ )); printf( result is %d\n , test( abcdefghlmnopqrs , DCGSRQPOM )); printf( result is %d\n , test( ABCDEFGHLMNOPQRS , dcgsrqpoz )); retrun 0;}
hello.
First congratulations on http pg project.
I would like to referring to a question helps because I am returning a json to function, and sometimes works, usually the first time, but most of the time if I give an F5, is giving me an error.
{
“error” : “function returned multiple rows at /usr/local/bin/pg_proc_jsonrpc.psgi line 138\n”,
“result” : null
}
when it works is like this:
{
“error” : null,
“result” : [
{
“statushttp” : 200,
“idmensagem” : “203”,
“statussms” : 2,
“resultado” : “Enviada com sucesso”,
“telefone” : “011987400506”,
“idmensagemdetalhe” : “100”,
“dtregistro” : “2015-04-19 20:01:20.569588”,
“datahoraenvio” : “2015-04-19 20:01:21”
},
{
“statushttp” : 200,
“idmensagem” : “203”,
“statussms” : 2,
“resultado” : “Enviada com sucesso”,
“telefone” : “011987400506”,
“idmensagemdetalhe” : “100”,
“dtregistro” : “2015-04-19 20:01:20.569588”,
“datahoraenvio” : “2015-04-19 20:01:21”
}
]
}
link to test:
http://93.188.162.218/smsdk/get_historico_mensagem?_idmensagem=203&_token=bdd8bcc7a5d7c60ee2f20ae6df1c8aaa
Joel, i found your work on “pov” which is brilliant but hasn’t been updated in 10 years. How can i contact you to find out more about this or resucitate the project if it has lingered.
I just read your statement:
“I’m a strong believer of the exclusive use of stored procedures and putting all business logic inside the database, where the public top-level stored procedures becomes your application’s API.”
I don’t know if it is possible for a person to agree any more than I do with this sentiment. Joel! I need to speak with you!