[HACKERS] Get the offset of a tuple inside a table

2010-09-21 Thread Pei He
Hi, When I using an index scan, can I get the offset of the tuple in the table? Thanks -- Pei

Re: [HACKERS] Get the offset of a tuple inside a table

2010-09-21 Thread Pei He
On Tue, Sep 21, 2010 at 5:44 PM, Szymon Guz mabew...@gmail.com wrote: On 21 September 2010 23:02, Pei He hepeim...@gmail.com wrote: Hi, When I using an index scan, can I get the offset of the tuple in the table? Thanks -- Pei What do you mean by the offset in the table?

Re: [HACKERS] Get the offset of a tuple inside a table

2010-09-21 Thread Pei He
, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Pei He wrote: The offset is the order of a tuple in a Sequential Scan. That's not a safe assumption. Try starting a sequential scan against a large table on one connection; then before it finishes, start the same query on another

Re: [HACKERS] Get the offset of a tuple inside a table

2010-09-21 Thread Pei He
. The bitmapscan needs to remember what have to been retrieved later, so it used the tidbitmap. But, for me, I need the bitmapset. Thanks, your reply helps me to find the bitmapset. Regards -- Pei On Tue, Sep 21, 2010 at 9:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: Pei He hepeim...@gmail.com writes

[HACKERS] Compute the number of tuples in a block

2010-09-21 Thread Pei He
Hi, In ctid, there are the block num, and the tuple offset inside the block. How can I know the maximum number of tuples in a block? The block size would be BLCKSZ. I am not quite sure where is the best place to find the size of the tuple in a table. Thanks -- Pei

[HACKERS] How to construct an exact plan

2010-08-30 Thread Pei He
Hi, I have developed a new operators, and I want to do some tests on it. I do not want the optimizer to choose the plan for me, and I need to construct a plan as exact as I want. Can anyone provide me a way to achieve that? Thanks -- Pei -- Sent via pgsql-hackers mailing list

Re: [HACKERS] How to construct an exact plan

2010-08-30 Thread Pei He
I forgot to mention that I am using postgresql 8.2.5. Thanks -- Pei On Mon, Aug 30, 2010 at 1:34 PM, Pei He hepeim...@gmail.com wrote: Hi, I have developed a new operators, and I want to do some tests on it. I do not want the optimizer to choose the plan for me, and I need to construct

Re: [HACKERS] How to construct an exact plan

2010-08-30 Thread Pei He
Hi, I am hacking postgresql 8.2.5. a) and b) do not work for me. The situation is that I made a join operator, and a scan operator. And, The join operator requires the scan operator as the inner. So, I need to have the full control of the join plan. I am not ready to provide the optimization

[HACKERS] About the types of fields in a data structure

2010-08-26 Thread Pei He
Hi, When I check the types of fields in a data structure, I found most fields are defined as general types, as List, Node. Then, To know the content inside the List, I need to track the usage of the fields. For example, the fromClause in SelectStmt is defined as List. And, the content in the

[HACKERS] About debug two versions of postgresql in eclipse

2010-08-24 Thread Pei He
Hi, I want to run two different versions of postgresql-8.2.5 under eclipse. But, it requires me to change PGDATA and LD_LIBRARY_PATH to switch. Moreover, to let eclipse know the changes, I need to modify .profile under my home folder, and log out and log in. (I am using Ubuntu.) Is there a way

Re: [HACKERS] About debug two versions of postgresql in eclipse

2010-08-24 Thread Pei He
Thanks, Nicolas. It works. -- Pei On Tue, Aug 24, 2010 at 2:38 PM, Nicolas Barbier nicolas.barb...@gmail.com wrote: 2010/8/24 Pei He hepeim...@gmail.com: I want to run two different versions of postgresql-8.2.5 under eclipse. But, it requires me to change PGDATA and LD_LIBRARY_PATH

[HACKERS] Problem of Magic Block in Postgres 8.2

2010-04-01 Thread Pei He
Hi, I have some old code for extension functions in Postgres 8.0. And, I am trying to make it work with Postgres 8.2. One problem is about the Magic Block. The extension functions was developed by C++ mixed with C. The code is like: extern C Datum spgistinsert(PG_FUNCTION_ARGS) { ... } I have

[HACKERS] Ask help for putting SP-Gist into postgresql

2010-03-25 Thread Pei He
Hi, I am trying to put the SP-Gist package, a general index framework for space partitioning trees , into Postgresql source code. SP-Gist was developed for postgresql 8.0. However, now it does not work with the new version. So, for the submitted patch, what version of postgresql is required?