Re: [BUGS] Creating server-side functions: one simple error

2002-10-13 Thread Joe Conway
elein (by way of elein ) wrote: > This will not work if there is no EOS on the data portion of the > string. Text fields are not usually stored with the EOS on them, > are they? Yes, the TEXT data type is NULL terminated. Joe ---(end of broadcast)

Re: [BUGS] Creating server-side functions: one simple error

2002-10-11 Thread Peter Eisentraut
Ruslan A Dautkhanov writes: > Is this mean, that PostgreSQL not C++-ready for compiling server-side > functions, doesn't it? PostgreSQL is written in C and does not claim to be compilable by a C++ compiler. That includes the header files. > Is any methods exists for compiling procedure in > C++

Re: [BUGS] Creating server-side functions: one simple error

2002-10-11 Thread elein
This will not work if there is no EOS on the data portion of the string. Text fields are not usually stored with the EOS on them, are they? elein [EMAIL PROTECTED] On Wednesday 09 October 2002 21:14, Joe Conway wrote: > Ruslan A Dautkhanov wrote: > > Btw, how I can convert TEXT field to a CStrin

Re: [BUGS] Creating server-side functions: one simple error

2002-10-11 Thread Ruslan A Dautkhanov
Tom Lane wrote: > Ruslan A Dautkhanov <[EMAIL PROTECTED]> writes: > > SPI, and I have trap again - I can't translate datetime column, which > > pass to my procedure. I must convert it to UNIX 1970-seconds counter for > > my internal needs, but I havn't found _any_ PG_GETARG_* function in fmgr.h,

Re: [BUGS] Creating server-side functions: one simple error

2002-10-10 Thread Tom Lane
Ruslan A Dautkhanov <[EMAIL PROTECTED]> writes: > SPI, and I have trap again - I can't translate datetime column, which > pass to my procedure. I must convert it to UNIX 1970-seconds counter for > my internal needs, but I havn't found _any_ PG_GETARG_* function in fmgr.h, > which can read time typ

Re: [BUGS] Creating server-side functions: one simple error

2002-10-10 Thread Ruslan A Dautkhanov
Joe Conway wrote: > Ruslan A Dautkhanov wrote: > > Btw, how I can convert TEXT field to a CString one? I had tried to use > > char *cnum = PG_GETARG_CSTRING(0) instead of > > text tnum = PG_GETARG_NAME(0), but it's not worked properly. Is any function > > to convert text object to a null-t

Re: [BUGS] Creating server-side functions: one simple error

2002-10-09 Thread Joe Conway
Ruslan A Dautkhanov wrote: > Btw, how I can convert TEXT field to a CString one? I had tried to use > char *cnum = PG_GETARG_CSTRING(0) instead of > text tnum = PG_GETARG_NAME(0), but it's not worked properly. Is any function > to convert text object to a null-terminated string??? Thanks ag

Re: [BUGS] Creating server-side functions: one simple error

2002-10-09 Thread Ruslan A Dautkhanov
Tom Lane wrote: > Ruslan A Dautkhanov <[EMAIL PROTECTED]> writes: > > I have to create my own function in C lanuage, which > > will use SPI. The problem that when I had done all things, > > PostgreSQL says: > > isbs=# select pgf1test('123'); > > ERROR: Can't find function pgf1test in fil

Re: [BUGS] Creating server-side functions: one simple error

2002-10-09 Thread Tom Lane
Ruslan A Dautkhanov <[EMAIL PROTECTED]> writes: > I have to create my own function in C lanuage, which > will use SPI. The problem that when I had done all things, > PostgreSQL says: > isbs=# select pgf1test('123'); > ERROR: Can't find function pgf1test in file /usr/local/pgsql/lib/pgf1te