Re: [GENERAL] Convert from hex to string

2015-11-25 Thread Yuriy Rusinov
is means you can have a '0' in a > ebcdic database, transform it to to [0x30] byte array, encode this as > "30" and then transform the later to 00 30 00 10 because you are using > UTF16-BE wire encoding. Encoding is tricky enough without relying on > implicit convertion or on a character being the same as a byte. > > Francisco Olarte. > -- Best regards, Sincerely yours, Yuriy Rusinov.

[GENERAL] Convert from hex to string

2015-11-25 Thread Yuriy Rusinov
'), I receive the same string, such as '\x517420697320677265617421, which way I have to do for valid convert to/from hexadecimal ? Thanks for attention. -- Best regards, Sincerely yours, Yuriy Rusinov. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.or

Re: [GENERAL] Return setof values from C-function

2013-12-11 Thread Yuriy Rusinov
pfree (nulls); pfree (svals[1]); pfree (svals[0]); pfree (svals); //pfree (hvalues); SRF_RETURN_NEXT(funcctx, result);//HeapTupleGetDatum( tuple ) ); } else { SRF_RETURN_DONE(funcctx); } Thanks a lot. Yuriy Rusinov

Re: [GENERAL] Return setof values from C-function

2013-12-10 Thread Yuriy Rusinov
og (INFO, "%lu", il); > > tuple = heap_form_tuple( tupdesc, hvalues, nulls); > > elog (INFO, "%lu", il); > > //BuildTupleFromCStrings (attinmeta, hvalues); > > pfree (nulls); > > pfree (hvalues); > > SRF_RETURN_NEXT(funcctx, HeapTupleGetDatum( tuple ) ); > > } > > else > > { > > SRF_RETURN_DONE(funcctx); > > } > > as written in documentation, but my function drops on > > tuple = heap_form_tuple( tupdesc, hvalues, nulls); > > Could you tell me, are there any errors ? > > Where is 'tupdesc' coming from. Don't you need to copy it from the > function context? > > merlin > -- Best regards, Sincerely yours, Yuriy Rusinov.

[GENERAL] Return setof values from C-function

2013-12-09 Thread Yuriy Rusinov
(hvalues); SRF_RETURN_NEXT(funcctx, HeapTupleGetDatum( tuple ) ); } else { SRF_RETURN_DONE(funcctx); } as written in documentation, but my function drops on tuple = heap_form_tuple( tupdesc, hvalues, nulls); Could you tell me, are there any errors ? -- Best regards, Sincerely yours, Yuriy Rusinov.

Re: [GENERAL] WIN1251 localization

2013-06-21 Thread Yuriy Rusinov
/postgresql-8.4-main.log 9.1 main 5433 online postgres /var/lib/postgresql/9.1/main /var/log/postgresql/postgresql-9.1-main.log Best regards, Sincerely yours, Yuriy Rusinov.

Re: [GENERAL] WIN1251 localization

2013-06-15 Thread Yuriy Rusinov
Postgres 9.1 utf-8 On Sat, Jun 15, 2013 at 5:53 PM, Adrian Klaver wrote: > On 06/15/2013 02:16 AM, Yuriy Rusinov wrote: > >> >> Hello, All ! >> >> I am developing database. Initial scripts contains information in >> win1251 encoding. Now I have received pro

[GENERAL] WIN1251 localization

2013-06-15 Thread Yuriy Rusinov
CP1251 ru_RU.CP1251 $locale -a | grep ru ru_RU.cp1251 ru_RU.utf8 ru_UA.utf8 system ubuntu linux 11.10, where is an error and how to correct this ? -- Best regards, Sincerely yours, Yuriy Rusinov.

Re: [GENERAL] SPI_execute_with_args call

2013-05-05 Thread Yuriy Rusinov
Hello ! There is one's more question, which way I have to determine that void * randBuf acceptable or not for bytea type ? Thanks in advance. On Fri, May 3, 2013 at 9:44 PM, Yuriy Rusinov wrote: > Thanks a lot, I have corrected and bug was fixed. > > > On Fri, May 3, 201

Re: [GENERAL] SPI_execute_with_args call

2013-05-03 Thread Yuriy Rusinov
Thanks a lot, I have corrected and bug was fixed. On Fri, May 3, 2013 at 6:42 PM, Tom Lane wrote: > Yuriy Rusinov writes: > > In C-function I do > > size_t nr_ins = strlen ("insert into rand_state (state_rand) values > ($1);"); > > char * r_sql = (char *

Re: [GENERAL] SPI_execute_with_args call

2013-05-03 Thread Yuriy Rusinov
I'm sorry ! But if I commented SPI_execute_with_args call, then all others works without bugs. On Fri, May 3, 2013 at 2:31 PM, Gavin Flower wrote: > On 03/05/13 21:19, Yuriy Rusinov wrote: > > Hello, colleagues ! > > I have to write random number generator state into da

[GENERAL] SPI_execute_with_args call

2013-05-03 Thread Yuriy Rusinov
ou give some work examples for SPI_execute_with_args because I didn't find them in documentation. Thanks a lot. -- Best regards, Sincerely yours, Yuriy Rusinov.

Re: [GENERAL] GSL onto postgresql server 9.2

2013-04-17 Thread Yuriy Rusinov
Thanks a lot. I have compiled gsl with prefix=/usr and this is quite acceptable for us. On Mon, Apr 15, 2013 at 2:30 PM, Albe Laurenz wrote: > Yuriy Rusinov wrote: > > I have to put some C-language functions onto postgresql server 9.2. > These functions are used GSL > > sof

[GENERAL] GSL onto postgresql server 9.2

2013-04-12 Thread Yuriy Rusinov
r .so cannot load libgsl.so.0 no such file" despite of gsl library was installed onto /usr/local, library files are installed into /usr/local/lib. Where is the problem in postgresql or distribution ? -- Best regards, Sincerely yours, Yuriy Rusinov.

[GENERAL] GSL in mcbc(redhat)

2013-04-11 Thread Yuriy Rusinov
our functions with -lgsl and receive error libfloader.so cannot load libgsl.so.0 file not found. Under gentoo or ubuntu all works fine. Any ideas ? -- Best regards, Sincerely yours, Yuriy Rusinov.

Re: [GENERAL] Regular function

2013-04-01 Thread Yuriy Rusinov
ns to database ? Thanks a lot. Yuriy Rusinov.

Re: [GENERAL] Regular function

2013-03-30 Thread Yuriy Rusinov
; > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/**mailpref/pgsql-general<http://www.postgresql.org/mailpref/pgsql-general> > -- Best regards, Sincerely yours, Yuriy Rusinov.

[GENERAL] Regular function

2013-03-29 Thread Yuriy Rusinov
Hello colleagues ! I have to write pl/pgsql function that has to be triggered not before/after insert, but in definite time. Does postgresql allows to do this ? Thanks a lot. -- Best regards, Sincerely yours, Yuriy Rusinov.

Re: [GENERAL] Reference with inheritance propagate data

2012-06-14 Thread Yuriy Rusinov
t others columns may be different for tables. -- Best regards, Sincerely yours, Yuriy Rusinov. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Reference with inheritance propagate data

2012-06-12 Thread Yuriy Rusinov
, because postgresql does not allow automatically propagate data ? -- Best regards, Sincerely yours, Yuriy Rusinov. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Postgresql connect into windows server

2011-12-14 Thread Yuriy Rusinov
es, but which way I have to verify it ? When I add rule for 5432/tcp port, all works fine. Thanks a lot. -- Best regards, Sincerely yours, Yuriy Rusinov. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Postgresql connect into windows server

2011-12-13 Thread Yuriy Rusinov
Hello ! >> >> But pg_admin on windows successfully works on both servers. >> Any ideas ? > > > is a windows firewall blocking incoming connections on port 5432/tcp ? > Possible yes, but which way I have to verify it ? -- Best regards, Sincerely yours, Yuri

[GENERAL] Postgresql connect into windows server

2011-12-13 Thread Yuriy Rusinov
g_admin on windows successfully works on both servers. Any ideas ? Thanks in advance. -- Best regards, Sincerely yours, Yuriy Rusinov. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Please help

2009-07-16 Thread Yuriy Rusinov
Hello, Roseller ! > > What should I do to access my database and retrieve the important records in > it? Possible you should keep files in database cluster, recreate db cluster and put your old files into newly created cluster. -- Best regards, Sincerely yours, Yuriy Rusinov. --

Re: [GENERAL] triggers

2009-04-17 Thread Yuriy Rusinov
rds, Sincerely yours, Yuriy Rusinov. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Complex query optimization

2008-02-01 Thread Yuriy Rusinov
Sincerely yours, Yuriy Rusinov

[GENERAL] C++ functions under Windows

2003-07-01 Thread Yuriy Rusinov
Hello ! I have to develop c++ function for PostgreSQL 7.3.1 under Windows 2000, what compilers and linkers may be used for this purposes ? I have Visual C++ 6.0 and C++Builder 5.0 . May I use them ? Best regards, Sincerely yours, Yuriy Rusinov. ---(end of broadcast