Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pg_host(3) [php man page]

PG_HOST(3)																PG_HOST(3)

pg_host - Returns the host name associated with the connection

SYNOPSIS
string pg_host ([resource $connection]) DESCRIPTION
pg_host(3) returns the host name of the given PostgreSQL $connection resource is connected to. 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 name of the host the $connection is to, or FALSE on error. EXAMPLES
Example #1 pg_host(3) example <?php $pgsql_conn = pg_connect("dbname=mark host=localhost"); if ($pgsql_conn) { print "Successfully connected to: " . pg_host($pgsql_conn) . "<br/> "; } else { print pg_last_error($pgsql_conn); exit; } ?> SEE ALSO
pg_connect(3), pg_pconnect(3). PHP Documentation Group PG_HOST(3)

Check Out this Related Man Page

PG_TTY(3)																 PG_TTY(3)

pg_tty - Return the TTY name associated with the connection

SYNOPSIS
string pg_tty ([resource $connection]) DESCRIPTION
pg_tty(3) returns the TTY name that server side debugging output is sent to on the given PostgreSQL $connection resource. Note pg_tty(3) is obsolete, since the server no longer pays attention to the TTY setting, but the function remains for backwards compati- bility. 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 debug TTY of the $connection, or FALSE on error. EXAMPLES
Example #1 pg_tty(3) example <?php $pgsql_conn = pg_connect("dbname=mark host=localhost"); if ($pgsql_conn) { print "Server debug TTY is: " . pg_tty($pgsql_conn) . "<br/> "; } else { print pg_last_error($pgsql_conn); exit; } ?> PHP Documentation Group PG_TTY(3)
Man Page

6 More Discussions You Might Find Interesting

1. Debian

Killing host connection

Hi All Is there a command (or set of commands) that can be used to kill a connection listed in the netstat table? Say there is a host connected to a certain port on your machine, and it is listed via a 'netstat -an', is there a way to issue some commands to 'disconnect' or kill that connection? ... (5 Replies)
Discussion started by: saabir
5 Replies

2. UNIX for Dummies Questions & Answers

check Internet connection?

I am using SUSE OS and want to check internet connection... I have tried: ping -c3 google.com The output i have got is: Unknown host google.com does it means that i do not have Internet connection?? Or please help me with any Command to find Internet connection? Thanks for any help. (1 Reply)
Discussion started by: salil2012
1 Replies

3. Linux

connection from where?

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)
Discussion started by: itik
0 Replies

4. IP Networking

Multiple wan connection on single PC

Hi All Is it possible to be connected to a corporate lan/wan through the on-baord nic, and also be connected to mobile wan through a tethered smartphone? Ideally I'd like to be able to use my own smartphone using a browser like chrome (private browsing) while still being able to use the... (3 Replies)
Discussion started by: huskie69
3 Replies

5. UNIX for Dummies Questions & Answers

How to find Hung connection in UNix Systems ?

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)
Discussion started by: Hyp_Todd
3 Replies

6. UNIX for Beginners Questions & Answers

Print out my current http connection

Good evening Need you help please I just wanna to print out my current https connection and other users http connection which the application resides, for instance i connect to the below url to login into the application: https://serverappp01:14100/portal/Portal.html# In another session... (4 Replies)
Discussion started by: alexcol
4 Replies