[fpc-pascal] GetTableNames in TSQLConnection / Postgresql

Reinier Olislagers reinierolislagers at gmail.com
Sun Dec 16 09:08:20 CET 2012


On 16-12-2012 2:27, John wrote:
> @Reinier:
>>> Analysis:
>>> As far as I can work out, a call to GetTableNames calls GetDBInfo, with
>>> parameters
>>>    ASchemaType : TSchemaType - This specifies what info we want - user
>>> tables, sys tables, procedures, columns etc
>>>    ASchemaObjectName - Doesn't seem to be used, it is specified as ""
>> No, it's not used for GetTableNames; it is used e.g. to specify the
>> table name if you want to know info about columns.
> Yes, I saw that, but there seems no reason why it could not be used as a
> schema selection.
I understand; just wanted to let you know what it was used for.

> I also had a flip through the previous discussion, but it was indeed a
> long and tortuous thread to follow!
Agreed. AFAIR, there was a decision in the end... but it was a long
thread and a long while ago.
I've incorporated some of Lacak's proposal into
http://wiki.lazarus.freepascal.org/Database_metadata#Proposal_for_extension.2Funiformization
... and will update that page going through that thread.
If anybody gets to it earlier, please feel free to update the page ;)

> So the question comes back to "how should the table names be returned
> ?"  Indeed, is there a specification for what should be returned for all
> of these metadata queries ?
AFAIR, there is no single spec as there are multiple examples we can
draw from (ODBC, JDBC, Delphi ADO etc)
IIRC, that thread did have a decision in the end though on what
everybody agreed was a good proposal.




More information about the fpc-pascal mailing list