Re: [GENERAL] Problem with using snprintf in C-function

2009-10-17 Thread Tom Lane
Ilya Urikh writes: > This code I wrote for PostgreSQL 8.3.7 on Fedora 10 and it worked fine. But > now I use CentOS 5.3 and PostgreSQL 8.3.8. It looks to me like you're assuming that %ld is the appropriate format string for an int64 value. This might be true on a 64-bit machine but it would not

Re: [GENERAL] Problem with using snprintf in C-function

2009-10-17 Thread Pavel Stehule
2009/10/17 Ilya Urikh : > Pavel, > > Could you provide some example? I don't really understand which placeholder > I can use. > here is one fragment from orafce: it's for delete statement, but SELECT statement is similar ItemPointer tid; Oid argtypes[1] = {TIDOID};

Re: [GENERAL] Problem with using snprintf in C-function

2009-10-17 Thread Ilya Urikh
Pavel, Could you provide some example? I don't really understand which placeholder I can use. On Sun, Oct 18, 2009 at 1:20 AM, Pavel Stehule wrote: > 2009/10/17 Ilya Urikh : > > Hi, > > > > I have a problem with snprintf function which insert the variables to > string > > with error. > > This c

Re: [GENERAL] Problem with using snprintf in C-function

2009-10-17 Thread Pavel Stehule
2009/10/17 Ilya Urikh : > Hi, > > I have a problem with snprintf function which insert the variables to string > with error. > This code I wrote for PostgreSQL 8.3.7 on Fedora 10 and it worked fine. But > now I use CentOS 5.3 and PostgreSQL 8.3.8. > > Function: > Datum calculateAccount(PG_FUNCTION_