Re: [HACKERS] ERROR: index row size

2007-06-04 Thread Rodrigo Sakai
>but I'll bet >a nickel your CREATE TYPE says something else --- probably varlena You win, how can I pay this bet? :) Very very thanks, I was looking for the error in the wrong place! It was so simple and works! But still have another problem, may be related with my output functions!?!?

Re: [HACKERS] ERROR: index row size

2007-06-03 Thread Rodrigo Sakai
>Indeed ... *please* tell us your compiler issued a warning about that. I did shell scripts that suppress the warnings, so it was a big mistake, I agree! But I think my problem is not here! > Well, you oughta allocate result before you store into it, not after, > and I bet you meant to assign to

Re: [HACKERS] ERROR: index row size

2007-06-03 Thread Rodrigo Sakai
tvi_char). Just date types are allowed! Any other suggestions?? Thanks! -Original Message- From: Jeremy Drake [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 4 de junho de 2007 00:23 To: Rodrigo Sakai Cc: PostgreSQL Hackers Subject: Re: [HACKERS] ERROR: index row size Just glancing at

Re: [HACKERS] ERROR: index row size

2007-06-03 Thread Tom Lane
Jeremy Drake <[EMAIL PROTECTED]> writes: >> chartvi_char[MAXDATEFIELDS]; >> >> tvi_char = (char *) palloc(strlen(MAXDATEFIELDS)); > What are you doing here? This is completely broken. Indeed ... *please* tell us your compiler issued a warning about that. If not an error --- none of the comp

Re: [HACKERS] ERROR: index row size

2007-06-03 Thread Jeremy Drake
Just glancing at this, a couple things stand out to me: On Mon, 4 Jun 2007, Rodrigo Sakai wrote: > Datum > periodo_in(PG_FUNCTION_ARGS) > { > char*str = PG_GETARG_CSTRING(0); > chartvi_char[MAXDATEFIELDS]; > chartvf_char[MAXDATEFIELDS]; > > tvi_char = (char *) palloc(s

[HACKERS] ERROR: index row size

2007-06-03 Thread Rodrigo Sakai
Hello, Ok, I give up! Tried a lot of things in my code! But still get error on index row size. So, I'm part of my code, if someone could help me! A valid value for this type is: '(03-jan-2007 , 15-may-2010)' typedef struct t_periodo { DateADT tvi; DateADT

Re: [HACKERS] ERROR: index row size

2007-06-02 Thread Mark Kirkwood
Rodrigo Sakai wrote: Hello, I’m having a big trouble with the index size! I have looked for a solution in the internet, but the solutions that I found don’t fit for me! I would guess you have an allocation calculation error/memory leak somewhere in your implementation - maybe post a

Re: [HACKERS] ERROR: index row size

2007-06-02 Thread Tom Lane
"Rodrigo Sakai" <[EMAIL PROTECTED]> writes: > I developed a new data type using C and add this new type on PostgreSQL. > Basically, the data type is: (DateADT, DateADT) with some temporal rules > that I'm researching! The data type is ok; the in, out, receive and send > functions are ok; some ope

[HACKERS] ERROR: index row size

2007-06-02 Thread Rodrigo Sakai
Hello, I'm having a big trouble with the index size! I have looked for a solution in the internet, but the solutions that I found don't fit for me! I developed a new data type using C and add this new type on PostgreSQL. Basically, the data type is: (DateADT, DateADT) with some temporal

Re: [HACKERS] ERROR: index row size 2960 exceeds btree maximum

2007-05-31 Thread Alvaro Herrera
Rodrigo Sakai wrote: > Basically, the data type is a composition of two timestamps, like: > (timestamp, timestamp) and it is called 'period'. So, almost everything is > fine. Data type is ok, operators are ok, but the index doesn't work fine. Does type tinterval not suit you? It is not very we

Re: [HACKERS] ERROR: index row size 2960 exceeds btree maximum

2007-05-31 Thread Hannu Krosing
Ühel kenal päeval, K, 2007-05-30 kell 21:41, kirjutas Rodrigo Sakai: > Hello, > > > > I’m developing an application that needs a different data type. So, > I have implemented this new data type inside postgresql using C, as > documentation shows to. > > > > Basically, the data type is

[HACKERS] ERROR: index row size 2960 exceeds btree maximum

2007-05-30 Thread Rodrigo Sakai
Hello, I'm developing an application that needs a different data type. So, I have implemented this new data type inside postgresql using C, as documentation shows to. Basically, the data type is a composition of two timestamps, like: (timestamp, timestamp) and it is called 'period'. S