I can’t find any documentation on how to get Data Dictionary information from PostGreSql.
The below statement works in PgAdmin but not in Xbase++.
I tried the SELECT command and the USE command to no avail.
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'public'
I am not having problems accessing data from Northwind and also other databases that I have upsized, so I know that I am communicating with the server.
Is anyone using PostGreSql?
Is anyone using PostGreSql?
The eXpress train is coming - and it has more cars.
Re: Is anyone using PostGreSql?
hi,
try this wayrdonnay wrote:Code: Select all
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'public'
Code: Select all
::cQuery := "SELECT table_name FROM information_schema.tables " + ;
"WHERE table_schema = 'public'"
greetings by OHR
Jimmy
Jimmy
Re: Is anyone using PostGreSql?
That doesn't work either.
What is ::cQuery ?
What command or function do you run after creating the statement?
It appears that the only way that Postgresql is useful is via the ODBCDBE.
What is ::cQuery ?
What command or function do you run after creating the statement?
It appears that the only way that Postgresql is useful is via the ODBCDBE.
The eXpress train is coming - and it has more cars.
Re: Is anyone using PostGreSql?
hi,
i'm using PostgreSQL native this Way.
merry Xmas 
i'm using PostgreSQL native this Way.
Code: Select all
// send Query
//
IF ::oPG:Exec( ::cQuery )
::oR_Table := ::oPG:result

greetings by OHR
Jimmy
Jimmy
Re: Is anyone using PostGreSql?
What class is ::oPG ?
What do you mean by native?
Are you using a 3rd party library?
What do you mean by native?
Are you using a 3rd party library?
The eXpress train is coming - and it has more cars.
Re: Is anyone using PostGreSql?
hi,
i just use libpq.dll*** (32bit) native to access PostgreSQL. it is based on Phil Ide CLASS from 2003. as i use ot4xb i use Xbase++ Wrapper from Pablo Botella. have fun
*** Note : libpq.dll itself need some *.DLL
copy all *.DLL (except wxbase28u*.DLL) from \PostgreSQL\xx.x\bin\ into your Xbase++ App Directory
i just use libpq.dll*** (32bit) native to access PostgreSQL. it is based on Phil Ide CLASS from 2003. as i use ot4xb i use Xbase++ Wrapper from Pablo Botella. have fun
*** Note : libpq.dll itself need some *.DLL
copy all *.DLL (except wxbase28u*.DLL) from \PostgreSQL\xx.x\bin\ into your Xbase++ App Directory
greetings by OHR
Jimmy
Jimmy
Re: Is anyone using PostGreSql?
I found a solution. I discovered DacSqlStatement().
Code: Select all
IF(!DbeLoad("pgdbe"))
Alert( "Unable to load the PostgreSQL DatabaseEngine", {"Quit"} )
QUIT
ENDIF
// Establish the connection
cConnect := "DBE=pgdbe;SERVER=localhost;DB=northwind;UID=postgres;PWD=" + GetEnv('POSTGRESQL_PASSWORD')
oSession := DacSession():New( cConnect ):GetDefault()
IF .NOT. oSession:isConnected()
DCMSGBOX oSession:GetLastMessage(), ;
"Unable to establish connection to server"
QUIT
ENDIF
cSql := "SELECT * FROM INFORMATION_SCHEMA.COLUMNS" + ;
" WHERE table_schema = 'public'" + ;
" ORDER BY table_name,column_name"
oStmt := DacSqlStatement():FromChar(cSql)
oStmt:Build():Query(,'TABLES')
DC_Dot()
The eXpress train is coming - and it has more cars.
Re: Is anyone using PostGreSql?
Hi Roger
How about the performance of pgdbe from your current interraction ?
Thanks
Joe
How about the performance of pgdbe from your current interraction ?
Thanks
Joe
Re: Is anyone using PostGreSql?
I don't use it in ISAM mode because it still doesn't work.How about the performance of pgdbe
If I open a table with dbUsearea() it doesn't navigate correctly.
But if I open the same table with SELECT * it works fine.
Performance seems pretty good in SQL mode.
The eXpress train is coming - and it has more cars.