Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieve list of indexes of a PostgreSQL table
Message
 
 
À
08/11/2012 10:12:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01556687
Message ID:
01556715
Vues:
49
This message has been marked as a message which has helped to the initial question of the thread.
You are making it harder than it should be
TEXT TO cSelectStr NOSHOW
Select IndexDef 
  From   pg_indexes
  Where  TableName  = ?cTableName
ENDTEXT
>
>Thanks so much for your informatiom, found here http://www.postgresql.org/docs/9.2/static/view-pg-indexes.html, where you pointed me to.
>
>The code to retrieve the indexes is very simple:
>
> cIndexesStr = ""
>
> cSelectStr = "Select IndexDef                " + ;
>              "                               " + ;
>              "From   pg_indexes              " + ;
>              "                               " + ;
>              "Where  TableName  = ?cTableName"
>
> SQLexec (gSQLHandle, cSelectStr, "CurBuildIndexSQL") 
> 
> Select CurBuildIndexSQL
>
> If RecCount () = 0
>    Use In CurBuildIndexSQL
>    Return
> endif
>
> Select CurBuildIndexSQL
> Go     Top
>
> cIndexesStr = IndexDef
>
>Regards,
>
>Fernando
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform