Re: [HACKERS] ERROR: index row size

2007-06-03 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

[HACKERS] Working with CVS documentation

2007-06-03 Thread Greg Smith
I've now finished up initial content generation on the wiki page that covers using the CVS repository: http://developer.postgresql.org/index.php/Working_with_CVS That includes all the helpful comments suggested on this list in last month's threads on this topic along with a full dump of what

Re: [HACKERS] syslogger line-end processing infelicity

2007-06-03 Thread Magnus Hagander
Andrew Dunstan wrote: Magnus Hagander wrote: My second thought is that we should quite possibly abandon this translation altogether - we know that our COPY code is quite happy with either style of line ending, as long as the file is consistent, and also many Windows programs will quite

[HACKERS] IsTransactionState() is being used incorrectly

2007-06-03 Thread Tom Lane
I just noticed that there are a number of places (mostly GUC assignment hooks) that use IsTransactionState() to decide if it's safe for them to do catalog lookups. This seems pretty bogus because IsTransactionState will return true in an aborted transaction. I'm not sure there's any actual bug

Re: [HACKERS] What is happening on buildfarm member baiji?

2007-06-03 Thread Magnus Hagander
Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: +sprintf(mutexName,postgresql.interlock.%i, portNumber); That won't do; it should be legal for two postmasters to listen on different IP addresses using the same port number. So you need to include some representation of

Re: [HACKERS] What is happening on buildfarm member baiji?

2007-06-03 Thread Andrew Dunstan
Magnus Hagander wrote: However, if I just *skip* setting SO_REUSEADDR completely, things seem to work the way we want it. I cannot start more than one postmaster on the same addr/port. If I start a psql, then terminate postmaster, I can restart a new postmaster right away. Given this, I

Re: [HACKERS] What is happening on buildfarm member baiji?

2007-06-03 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Magnus Hagander wrote: Given this, I propose we simply #ifdef out the SO_REUSEADDR on win32. Anybody see a problem with this? Is that true even if the backend crashes? It would take a postmaster crash to make this an issue, and those are pretty

[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-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 *)

Re: [HACKERS] What is happening on buildfarm member baiji?

2007-06-03 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Given this, I propose we simply #ifdef out the SO_REUSEADDR on win32. Anybody see a problem with this? (A fairly good reference to read up on the options is at http://msdn2.microsoft.com/en-us/library/ms740621.aspx Hmm ... if accurate, that page says

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 compilers I

Re: [HACKERS] ERROR: index row size

2007-06-03 Thread Rodrigo Sakai
Hello Jeremy, You are right about: char tvi_char[MAXDATEFIELDS]; I have already tried this and didn't work too, it keeps giving the index error! About: if (sscanf(str, ( %s , %s ), tvi_char, tvf_char) != 2) I test tvi_char and tvf_char with StringToDateADT(tvi_char). Just

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