[Question] Help me with programming in C/C++

From: "postgres" <postgres(at)korea(dot)co(dot)kr>
To: <pgsql-general(at)postgreSQL(dot)org>
Subject: [Question] Help me with programming in C/C++
Date: 1998-10-05 05:21:02
Message-ID: 002501bdf01f$f3eeae40$04d9a1d1@eloha
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi.

I have a question regarding programming in C and postgreSQL.
Is there any way that I can save couple of results to one PGresult * ??

I got reply from some guys.. but...
Ok.. this is what I'm going to do..
I'm developing search engine.
Let's assume. If user enter for keywords like "Search Engine"
My program will separate each token.. and postgres will search like as
below..

Something Like this
------------------------
BEGIN;
DECLARE portal1 CURSOR FOR select * from db where description ~* '^search
engine$';
DECLARE portal2 CURSOR FOR select * from db where description ~* 'search
engine';
DECLARE portal3 CURSOR FOR select * from db where description ~* = 'search'
and description ~* 'engine';
DECLARE portal4 CURSOR FOR select * from db where description ~* = 'search'
or description ~* 'engine';

res = PQexec(conn,"FETCH ALL in portal*"); // Like this
END;
------------------------
portal1 sould go first, portal4 should go last.
And I don't wanna use any insert/copy command (Don't wanna make any new
temporary table. becasue there are lots of querys)

I really need this function.
I'm a C programmer but not a expert.

Any Idea? If anyone know how to do this in C/C++...
Please let me know..

Thanks in advence.

Browse pgsql-general by date

  From Date Subject
Next Message Greg Youngblood 1998-10-05 12:15:39 RE: [GENERAL] Please help with performance tuning on Postgres
Previous Message postgres 1998-10-05 03:29:20 [Question] Help me with programming in C/C++