PG_LAST_ERROR(3)PG_LAST_ERROR(3)pg_last_error - Get the last error message string of a connectionSYNOPSIS
string pg_last_error ([resource $connection])
DESCRIPTION pg_last_error(3) returns the last error message for a given $connection.
Error messages may be overwritten by internal PostgreSQL (libpq) function calls. It may not return an appropriate error message if multi-
ple errors occur inside a PostgreSQL module function.
Use pg_result_error(3), pg_result_error_field(3), pg_result_status(3) and pg_connection_status(3) for better error handling.
Note
This function used to be called pg_errormessage(3).
PARAMETERS
o $connection
- PostgreSQL database connection resource. When $connection is not present, the default connection is used. The default connection
is the last connection made by pg_connect(3) or pg_pconnect(3).
RETURN VALUES
A string containing the last error message on the given $connection, or FALSE on error.
EXAMPLES
Example #1
pg_last_error(3) example
<?php
$dbconn = pg_connect("dbname=publisher") or die("Could not connect");
// Query that fails
$res = pg_query($dbconn, "select * from doesnotexist");
echo pg_last_error($dbconn);
?>
SEE ALSO pg_result_error(3), pg_result_error_field(3).
PHP Documentation Group PG_LAST_ERROR(3)
I get this error message in my maillog. Can someone tell me what it means?
SYSERR(root): collect: I/O error on connection from mail-05.goomba.com
I guess it means that the server could not connect to mail-06.goomba.com. Is my interpretation correct?
Any idea why it happens? (1 Reply)
Dear All
I have three site in multi city and have in three site
ADSL connection with Fixed IP and three Connection leased line
(VHSDSL) and
and the primary connection it's VHSDSL and BAckup up connection ADSL
So can i use IPMP in solaris OS 10 in three Site to have this Service
in three Site... (0 Replies)
I wrote a very simple script to calculate the DB connection from an appserver and check the total netstat connection to a particular DB exceed 25 then it will send mail
netstat -a 2> /dev/null | awk '/.*ESTAB/{print $5}' | cut -d. -f1 | uniq -c | awk '{if ($1 > 25)print $2," exceed ",$1;}'
... (1 Reply)
Hi All,
I got this /var/log/messages and I would like to know where this came from
messages:Feb 3 16:30:10 localhost PAM-Wheel: unknown user admin
messages:Feb 3 16:30:12 localhost pam_tally: pam_tally: pam_get_uid; no such user admin
messages:Feb 3 16:30:12 localhost PAM-Wheel: unknown... (0 Replies)
Hi all,
I am trying to winscp to RHEL5 server and i am ending up with following error.
Network error:connection timed out
The system is up and running but not able to winscp.
Tried SFTP,SCP and FTP protocols in winscp but none worked.
I can ssh into this server from another server... (3 Replies)
Hi
Am making connection to oracle using ISQL as shown in the code.
This code is just a minor part of a big code.
I want to capture the error if the password/login is wrong or if connection is not made.
I need to capture the error code also.
Also, If such an error occurs, i need to exit out... (4 Replies)
Hi Gurus ,
How to find Hung connection in Unix Systems
I use ps -ef | grep "XXXX"
it lists out some conections..How to know what is hung connection in there.. (3 Replies)