Re: [HACKERS] Issue on C function that reads int2[] (using "int2vector")

2015-12-01 Thread Rodrigo Hjort
2015-11-30 0:39 GMT-02:00 Tom Lane: > Rodrigo Hjort writes: > > I created a custom C function with this signature: > > > CREATE FUNCTION calculate_hash(numbers int2[]) > > RETURNS int8 > > AS 'MODULE_PATHNAME', 'pg_calculate_hash' > > LANGUAGE C

[HACKERS] Help on creating C function that reads int2[] (using "int2vector")

2015-12-01 Thread Rodrigo Hjort
b: https://github.com/hjort/mega-sena/tree/master/src Best regards, -- Rodrigo Hjort www.hjort.co

[HACKERS] Issue on C function that reads int2[] (using "int2vector")

2015-11-29 Thread Rodrigo Hjort
b: https://github.com/hjort/mega-sena/tree/master/src Best regards, -- Rodrigo Hjort www.hjort.co

Re: [HACKERS] Strange behavior on to_tsquery()

2011-11-04 Thread Rodrigo Hjort
=postgresql.git;a=commitdiff;h=e3e3087d8717c26cd1c4581ba29274ac214eb816 regards, tom lane I modified my code by calling *palloc0()* instead and that issue no longer appears. :D Thanks, Tom Lane! -- Rodrigo Hjort www.hjort.co

[HACKERS] Strange behavior on to_tsquery()

2011-11-03 Thread Rodrigo Hjort
and how to solve this issue, please? 2) Sometimes the value returned by *to_tsquery()* has a :* suffix. What does that mean? Thanks in advance. Best Regards, -- Rodrigo Hjort www.hjort.co

[HACKERS] DBLink's default user: postgres

2007-10-17 Thread Rodrigo Hjort
); usr| db --+ postgres | escola (1 registro) This way, I fear DBLink functions should become a vulnerability issue on my database. Is there any way to protect or override this setting? Or it should be done on pg_hba.conf only? -- Regards, Rodrigo Hjort http://icewall.org

[HACKERS] Deferred Constraints

2007-08-16 Thread Rodrigo Hjort
Dear Hackers, Could you point me the first version PostgreSQL started to support Deferred Constraints (ie: DEFERRABLE keyword on foreign keys creation)? I guess it is earlier than 7.0, right? -- Regards, Rodrigo Hjort http://icewall.org/~hjort ---(end of broadcast

[HACKERS] Ontology on PostgreSQL - is there something?

2006-11-18 Thread Rodrigo Hjort
on the backend internals, how difficult is it to develop this (3 operators + 1 index type)? -- Best regards, Rodrigo Hjort http://icewall.org/~hjort CELEPAR - Cia de Informática do Paraná - Brasil http://www.pr.gov.br

Re: [HACKERS] Connection Broken with Custom Dicts for TSearch2

2006-06-07 Thread Rodrigo Hjort
How about those pg_ts* tables, which are specific for a database? Will they serve to the whole cluster?2006/6/7, Teodor Sigaev [EMAIL PROTECTED] :OpenFTS never, but tsearch2 is possible. But it requires enough work to do, so I have doubt that it will be done in 8.2...-- Rodrigo

[HACKERS] Connection Broken with Custom Dicts for TSearch2

2006-06-02 Thread Rodrigo Hjort
Sorry, but I thought it that was the most appropriate list for the issue.I was following these instructions:http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/custom-dict.html And what happens is that the function works just once. Perhaps a malloc/free issue?$ psql fuzzyfuzzy=# select

Re: [HACKERS] Connection Broken with Custom Dicts for TSearch2

2006-06-02 Thread Rodrigo Hjort
Oleg, Actually I got PG 8.1.4 compiled from source on a Debian GNU/Linux 2.6.16-k7-2. My locale is pt_BR, but I configured TSearch2 to use rules from the 'simple'. Then I just followed the instructions from the link. The fact is that it only works at the first time. Regards, Rodrigo Hjort http

Re: [HACKERS] LIKE, leading percent, bind parameters and indexes

2006-05-25 Thread Rodrigo Hjort
or bound paremeter, makes the planner always do a sequential scan. Is that the scenario?-- Rodrigo Hjorthttp://icewall.org/~hjort 2006/5/23, Tom Lane [EMAIL PROTECTED]: Rodrigo Hjort [EMAIL PROTECTED] writes: What happens is that only the 004 block uses the index! The 002 code, which also has no leading

Re: [HACKERS] LIKE, leading percent, bind parameters and indexes

2006-05-25 Thread Rodrigo Hjort
like 'THE NAME%'; -- index scanselect * from table where field like '%THE NAME%'; -- seq scanselect * from table where field like :bind_param; -- seq scan (always)Regards, Rodrigo Hjort http://icewall.org/~hjort

[HACKERS] LIKE, leading percent, bind parameters and indexes

2006-05-23 Thread Rodrigo Hjort
PG-Hackers,I got the following picture:detran=# \d sa_dut.tb_usuario Table sa_dut.tb_usuario Column | Type | Modifiers-+-+--- numprocesso | bigint | not nullnome | character varying(44) |nomemae | character varying(44) |datanascimento |

[HACKERS] Issue on Varchar Ordering

2006-03-29 Thread Rodrigo Hjort
Pg-Hackers,I'm having the following issue:create table aluno (id serial, nome varchar(60));rodrigo=# select * from aluno order by nome offset 35 limit 5;id | nome+--- 36 | GABRIELA HELEDA DE SOUZA37 | GABRIELA JACOBY NOS38 | GABRIEL ALCIDES KLIM PERONDI39 |

Re: [HACKERS] Issue on Varchar Ordering

2006-03-29 Thread Rodrigo Hjort
Yeah, I think there's a problem on Linux locales.Using the C locale, it works as expected:[EMAIL PROTECTED]:~$ export LC_ALL=C cat test.txt | sortGABRIEL ALCIDES KLIM PERONDIGABRIEL ALEXANDRE DA SILVA MANICA GABRIELA HELEDA DE SOUZAGABRIELA JACOBY NOSGABRIELA LETICIA BATISTA NUNESBut when using

Re: [HACKERS] Issue on Varchar Ordering

2006-03-29 Thread Rodrigo Hjort
Thanks all. I'm gonna try other locales and encodings.2006/3/29, Tom Lane [EMAIL PROTECTED]: Rodrigo Hjort [EMAIL PROTECTED] writes: The fact is that I can't raise PostgreSQL with C encoding, as special characters are used on most tables. You're confusing locale and encoding, which are two

Re: [HACKERS] Restoring a Full Cluster on a Different Architecture (32 x 64)

2006-03-15 Thread Rodrigo Hjort
Well, actually we're ain't gonna do this procedure regularly, but just in case of failure - if it ever happens.For the moment, I did the dump/restore and it worked, but took almost 1 hour, due to tsearch2 indexes on a table. Yeah, I thought 64-bit data could be stored on other files than

[HACKERS] Restoring a Full Cluster on a Different Architecture (32 x 64)

2006-03-13 Thread Rodrigo Hjort
Dear PostgreSQL Hackers,We got a PG 8.1 on a Debian 64 bits, which does a full backup (PITR) daily.Then we installed a Debian 32 bits (actually, it's on VMWare) and wanted to restore the previous PG cluster on it. As there are a lot of indexes, specially GiST, pg_dump and pg_restore are not viable

[HACKERS] Server Programming in C: palloc() and pfree()

2006-02-09 Thread Rodrigo Hjort
I'm having some problems when using pfree() on functions in C.Calling it on psql gives the exception below on both versions of function insert() [1,2] if pfree() is enabled: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing