when creating a tablespace pointing to an existing directory, PG create a subderictory with this pattern :
PG_???_!!!!!!!!!
where ??? is the version (by instance 9.1)
but I don't know what is !!!!!!!!!, actually 201105231
I can imagine that is a build version, but how can I obtain this number by a SQL Query ?
Thats a system catalog version number. You can retrieve with pg_controldata
Eg:
-bash-4.1$ ./pg_controldata pg_control version number: 903 Catalog version number: 201105231 Database system identifier: 5719586032196955957 Database cluster state: in production
-- Frédéric BROUARD - expert SGBDR et SQL - MVP SQL Server - 06 11 86 40 66 Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com Enseignant Arts & Métiers PACA, ISEN Toulon et CESI/EXIA Aix en Provence Audit, conseil, expertise, formation, modélisation, tuning, optimisation *********************** http://www.sqlspot.com *************************