Re: [HACKERS] gist DatumGetPointer returns pointer to corrupted data

2010-10-22 Thread Marios Vodas
2010/10/22 Teodor Sigaev > Type should have in/out function, at least dummy. If type is not present in > pg_type table then postgres can not operate with even on disk. > Yes, you are right. I did some tests and I found that in order for it to work correctly the type we specify in STORAGE paramet

Re: [HACKERS] gist DatumGetPointer returns pointer to corrupted data

2010-10-22 Thread Teodor Sigaev
Are you refering to table pg_type? If yes, those type structures exist only in c I didn't write any in-out functions, so they don't exist in sql level. Type should have in/out function, at least dummy. If type is not present in pg_type table then postgres can not operate with even on disk. --

Re: [HACKERS] gist DatumGetPointer returns pointer to corrupted data

2010-10-19 Thread Marios Vodas
On Tue, Oct 19, 2010 at 10:23 PM, Robert Haas wrote: > Is pg_type.typlen set correctly? > Are you refering to table pg_type? If yes, those type structures exist only in c I didn't write any in-out functions, so they don't exist in sql level. I pass a different data type (which exists in sql) to

Re: [HACKERS] gist DatumGetPointer returns pointer to corrupted data

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 1:46 PM, Marios Vodas wrote: > I index these structures in gist: > >> typedef struct { >>     uint8 type_flag; >>     float8 xi; >>     float8 yi; >>     Timestamp ti; >>     float8 xe; >>     float8 ye; >>     Timestamp te; >>     int32 id; >> } typ_s_flagged; >> >> typede

[HACKERS] gist DatumGetPointer returns pointer to corrupted data

2010-10-19 Thread Marios Vodas
I index these structures in gist: typedef struct { > uint8 type_flag; > float8 xi; > float8 yi; > Timestamp ti; > float8 xe; > float8 ye; > Timestamp te; > int32 id; > } typ_s_flagged; > > typedef struct { > uint8 type_flag; > float8 xl; > float8 yl; >