[fpc-devel] Questions regarding PostgreSQL support in SqlDB
graemeg.lists at gmail.com
Mon Aug 17 00:11:14 CEST 2009
2009/8/16 Joost van der Sluis <joost at cnoc.nl>:
> But it's this way because nobody looked at it before, and all those
> things like column_datatype are effectively used by no-body, afaik. But
> patches are welcome. (The only reason this function is implemented at
> all is that it is used by Connection.getTableNames and .GetFieldNames.)
So is SqlDB+PostgreSQL not tested or Alpha / Beta quality? I was
hoping to use it in a production environment. PostgreSQL seems to be a
lot more powerful than other open source database + the PostgreSQL
tools like pgAdmin III are brilliant.
> This probably didn't exist when this code was written (postgres 5) and
> the information_schema is probably just a view which references to
Yes, any implementation of "information_schema" is normally a view.
The nice thing is that even if the underlying system tables change,
the information_schema views will not. Hence the reason it is
preferable to use the information_schema's if they exist, instead of
querying the system tables directly.
Is it still worth supporting anything before PostgreSQL 7.2 - as far
as I can see many major changes (for the better) occurred after 7.2
and 8.0. Hey, the database server is free, so there shouldn't be any
reason not to upgrade. :-)
> Could be. In fact, Bytea is not a blob field. So to support blob-fields,
All the documentation I read suggests that Bytea is used for BLOB
types. And Firebird's "blob subtype 1" is equal to "Text" in
> the databases you are used to use. (For blob-fields Postgresql ask you
> to use a plain number-field in which you store the blob-id, and then use
> seperate functions to retrieve the blob-data.
As far as I understood the documentation, that is all handled
internally by PostgreSQL. Users do not need to worry about something
like that, you use Bytea just like any other field type. The server
stores BLOB (bytea) data in a separate location to overcome the table
row size limit. Internally a reference is used in the users table, but
the end user never sees that.
> But please create bug-reports, preferrably with actual user-case
> problems, not only based on the code, but also show the results. That
> way we can find some way to be as compatible possible with other
> databases like Firebird.
Will do - expect many patches. I'm determined to get Free Pascal to
pass the extensive test suite of tiOPF. The database test suite gives
the DB components a very good workout. SqlDB+Firebird is doing pretty
well, but SqlDB+PostgreSQL still fails a lot of tests. Both are not
100% pass rate, but hopefully when I am done, they will be.
- Graeme -
fpGUI - a cross-platform Free Pascal GUI toolkit
More information about the fpc-devel