Обсуждение: Get result out of "commit" query...

Поиск
Список
Период
Сортировка

Get result out of "commit" query...

От
Dmitri Touretsky
Дата:
Good time of the day!

It's easy to work with Postgres from PHP scripts. You can access all
you need - tuples, fields, etc. BUT I was unable to find a way to get
a PostgreSQL reply on queries like "BEGIN" or (more important)
"COMMIT".

E.g. when I execute a query like
$tmp = pg_Exec($connection, "SELECT * ...")
I can get a number of returned tuples with pg_numrows($tmp), etc.
But when I execute
$tmp = pg_Exec($connection, "BEGIN")
I was unable to get anything out of $tmp. And I'm pretty sure
that PostgreSQL's reply "BEGIN" should be somewhere there...

There are a number of such queries and it would be useful to be able
to read output in order to know if things are going good or bad... Any
ideas? Oh, well, and pg_errormessage doesn't work _on such queries_
either - it's empty...

Also, it works fine in Perl script with Pg installed - you simply use
$tmp->cmdStatus

Best regards,
 Dmitri ( mailto:dmitri@listsoft.ru )

New SOFT daily (RUS):  http://www.listsoft.ru/
               (ENG):  http://www.listsoft.com/
Articles, tips      :  http://www.diskovod.ru/
---
User Error: replace user and press any key to continue.