just have a quick question. What i need to do is to create a shared memory structure (which i can do) and maintain in it a linked list which should be in shared memory too. I found the shmemqueue in postgres, but am having some problems using it. I just need to have the linked list store relation OID's. I see there is an Insert before and after which takes in an element and adds it to the queue. But the thing is - they are both SHM_QUEUE types. How can i convert an Oid to this type? Also, am i right in assuming that i can use this? I was looking for some examples of its use too. thanks
nailah On Fri, 20 Jun 2003, Neil Conway wrote: > Hi Nailah, > > I hope your summer is going well. I saw your post on -hackers regarding some > problems with hash_search. The dynahash API can be a little bit picky -- IIRC, > it requires you to NULL pad hash keys out to the appropriate length, rather > than just using a regular NULL-terminated C-string. You weren't specific on > the exact problem you were having, but perhaps taking a look at > src/backend/commands/prepare.c (in PostgreSQL 7.3 or later) would be helpful: > it is a simple example of manipulating a hash table of prepared statements > that I wrote last summer. Since last I heard you guys were still working with > 7.1, you can find the code in question here: > > http://developer.postgresql.org/cvsweb.cgi/~checkout~/pgsql-server/src/backend/commands/prepare.c?rev=1.18&content-type=text/plain > > If that doesn't help, the usual fallback of breaking of gdb and stepping > through the troublesome code might help track down the problem. > > BTW, I'm not subscribed to the -hackers list temporarily (just for the summer, > as I'm busy w/ MS work), so my response to questions posted there will > probably be erratic (I just browse the archives on the web occaisonally). > > -Neil > ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html