Page 1 of 1

PostGreSQL : are you interested in a wrapper for PB4 ?

Posted: Fri Jun 16, 2006 4:46 pm
by Flype
at work, i'll migrate our SGBDR from MySQL to PostGreSQL.
since purebasic use ODBC it should be easy.

i would like to make a wrapper for the 'libpq.dll'.

maybe some of you might be interested.

http://www.postgresql.org/

Posted: Sat Jun 17, 2006 2:10 am
by Flype
well, i'm suprised because it was not too hard.

so i made a PostgreSQL 8.1 wrapper for PB4.

works ok at home, but still in beta stage.

grab it here :
http://www.purebasic.fr/english/viewtop ... highlight=

Posted: Sat Jun 17, 2006 9:22 am
by Flype
just a little information that i didn't know:

Oracle Announces the Acquisition of PostgreSQL to improve it and keep it open-source :
http://www.postgresqlfr.org/files/oracle.html

Posted: Sat Jun 17, 2006 9:28 am
by Pantcho!!
THanks flype it sure will be usefull :o

great job 10x

Posted: Sat Jun 17, 2006 9:31 am
by z3phir2003
great job 10x for releasing the code

Posted: Sat Jun 17, 2006 9:49 am
by Flype
Yes, i hope it will be useful for pbusers.

Also, i think i will make a wrapper for the FireBird 1.5 SGBDR
as it is provided with a SDK, it should be as easy as MySQL 5 and PostgreSQL 8.1.
http://www.firebirdsql.org

I think we (pb-users) can bring to PureBasic 4.0 a collection
of ready-to-use SGBDR wrappers for the communauty making purebasic a little more professional.

Just an idea, if i understood well the subsytem functionality of purebasic, it should be possible to implement subsystems for Native ODBC / MySQL / PostgreSQL / FireBird / SQLite / Tsunami / and so on, with the advantage of using native database commands. Do you think it is do-able ?

It must be a good think even if the ODBC is also a simple and good way.

Posted: Sat Jun 17, 2006 1:35 pm
by Fred
Yes, the subsystem idea is the way to go, you just have create a new directory in Subsystems\ named 'MySQL' and put the new Database lib in it. Then specifified 'MySQL' in the subsystem field and it should work ;).

Posted: Sat Jun 17, 2006 1:48 pm
by Flype
thanks fred,
and should i program the new database.lib in C/C++
or can it be done with TailBite ?

what's happened if all native commands are not implemented ?

Posted: Sat Jun 17, 2006 2:51 pm
by Fred
It can be done with Tailbite, it's just a regular purelibrary. If you don't implement all the commands of the original lib, then the compiler with tells 'This function isn't a command, macro etc..' as the original lib is simply ignored.

Posted: Sat Jun 17, 2006 2:58 pm
by Dare
Hi Flype.

Thanks for this. :)

Posted: Sat Jun 17, 2006 4:48 pm
by blueb
Thanks Flype.

Having various database tools at our disposal should really help to make PureBasic noticed in the programming community.


Thanks again,
--blueb