We are moving our database from Advantage Database to PostgreSQL. One of the common patterns we use is something like:
TRY DROP TABLE #TemporaryTable; CATCH ALL END TRY;
SELECT Field1, Field2
INTO #TemporaryTable
FROM MainTable
WHERE Type=1;
CREATE INDEX FirstIndex ON #TemporaryTable (Field2);
We set a TAdsQuery down and issue ExecSQL. Then we set a TAdsTable down and open the #TemporaryTable. We can then set the IndexName to "FirstIndex". You can do this at design time if you like and all indexes show under the IndexName drop down.
When researching this pattern under PostgreSQL we found that the indexes are not available under the TFDTable. Here's the pattern we've implemented so far.
With TFDQuery execute:
DROP TABLE IF EXISTS TemporaryTable;
SELECT Field1, Field2
INTO TEMP TemporaryTable
FROM MainTable
WHERE Type=1;
CREATE INDEX FirstIndex ON TemporaryTable (Field2);
We can see the indexes do exist if we issue this SQL:
SELECT
indexname,
indexdef
FROM
pg_indexes
But they are not available to the TFDTable to set at design time or at run time.
We can of course use IndexFieldNames, but other parts of our UI implement themselves based on a pre-defined list of indexes that were specifically created.