Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pg_version(3) [php man page]

PG_VERSION(3)															     PG_VERSION(3)

pg_version - Returns an array with client, protocol and server version (when available)

SYNOPSIS
array pg_version ([resource $connection]) DESCRIPTION
pg_version(3) returns an array with the client, protocol and server version. Protocol and server versions are only available if PHP was compiled with PostgreSQL 7.4 or later. For more detailed server information, use pg_parameter_status(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
Returns an array with client, protocol and server keys and values (if available). Returns FALSE on error or invalid connection. EXAMPLES
Example #1 pg_version(3) example <?php $dbconn = pg_connect("host=localhost port=5432 dbname=mary") or die("Could not connect"); $v = pg_version($dbconn); echo $v['client']; ?> The above example will output: 7.4 SEE ALSO
pg_parameter_status(3). PHP Documentation Group PG_VERSION(3)

Check Out this Related Man Page

PG_PARAMETER_STATUS(3)													    PG_PARAMETER_STATUS(3)

pg_parameter_status - Looks up a current parameter setting of the server.

SYNOPSIS
string pg_parameter_status ([resource $connection], string $param_name) DESCRIPTION
Looks up a current parameter setting of the server. Certain parameter values are reported by the server automatically at connection startup or whenever their values change. pg_parameter_sta- tus(3) can be used to interrogate these settings. It returns the current value of a parameter if known, or FALSE if the parameter is not known. Parameters reported as of PostgreSQL 8.0 include server_version, server_encoding, client_encoding, is_superuser, session_authorization, DateStyle, TimeZone, and integer_datetimes. ( server_encoding, TimeZone, and integer_datetimes were not reported by releases before 8.0.) Note that server_version, server_encoding and integer_datetimes cannot change after PostgreSQL startup. PostgreSQL 7.3 or lower servers do not report parameter settings, pg_parameter_status(3) includes logic to obtain values for server_ver- sion and client_encoding anyway. Applications are encouraged to use pg_parameter_status(3) rather than ad hoc code to determine these val- ues. Caution On a pre-7.4 PostgreSQL server, changing client_encoding via SET after connection startup will not be reflected by pg_parame- ter_status(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). o $param_name - Possible $param_name values include server_version, server_encoding, client_encoding, is_superuser, session_authorization, Dat- eStyle, TimeZone, and integer_datetimes. RETURN VALUES
A string containing the value of the parameter, FALSE on failure or invalid $param_name. EXAMPLES
Example #1 pg_parameter_status(3) example <?php $dbconn = pg_connect("dbname=publisher") or die("Could not connect"); echo "Server encoding: ", pg_parameter_status($dbconn, "server_encoding"); ?> The above example will output: Server encoding: SQL_ASCII PHP Documentation Group PG_PARAMETER_STATUS(3)
Man Page

15 More Discussions You Might Find Interesting

1. IP Networking

UNIX and SNA protocol

Can anyone tell me how I can find out if a server has a SNA connection to a mainframe ? I need to find out at my work which servers use SNA by telnetting to that server and search for it, I just don't know what and where to look for... Any help appreciated ! Ron (2 Replies)
Discussion started by: ronw
2 Replies

2. Programming

Timeout with multithread server

I wrote a server which creates a thread for every client connection. I have to include timeout function that will kill the server thread if the client doesn't respond for specific time. That too using signal(SIGALRM). For this i am using alarm() function. When the server thread detects signal it... (1 Reply)
Discussion started by: Nads
1 Replies

3. HP-UX

Moving AutoRaid array to another system

Hi All, I'm trying to move a disk array installed to one server has HPUX 11.0 to another server with the same OS version. But how can I make the other server recognize the disks with all the volume groups and logical volumes I have created. Please advice. Thank you. :) (3 Replies)
Discussion started by: ranias
3 Replies

4. Programming

Problems with file descriptor

Hi, look at the following code: The client after estabilishing a connection with the server does the following: if ((peter = fopen(argv, "r")) == NULL){ printf("errore\n"); exit(0); } ... (11 Replies)
Discussion started by: teo
11 Replies

5. Red Hat

tcpdump and connection troubleshooting

Hello, I have a client server application and the connection from client (redhat) becomes lost. Is there a connection limit on Redhat Linux 4? I want to use tcpdump to trace all packets between server and client: On the client side, I thought of running tcpdump. Is there a way to filter the... (4 Replies)
Discussion started by: melanie_pfefer
4 Replies

6. Shell Programming and Scripting

Make sure connection

We have two servers , one is mount to another server , I am worry if the server is unstable , the connection ( mount ) will be broken , or when the server is rebooted , the connection will also be broken , can advise how can I make sure the mount is establish , can advise if I want to do the below... (1 Reply)
Discussion started by: ust
1 Replies

7. UNIX for Advanced & Expert Users

connection to localhost:10.0 host broken (explicit kill or server shutdown)

Hi All, We use tomcat web server and it will get terminated with below error: connection to localhost:10.0 host broken (explicit kill or server shutdown) Please let me know how to fix this error. (5 Replies)
Discussion started by: bache_gowda
5 Replies

8. AIX

IVM vs. HMC woes

I have a running VIO server that was managed via IVM. We made the (apparent) mistake of trying to connect a HMC server to it. Other than making a connection, no work has been done via HMC. We've since decided we don't want to use HMC and it's been powered off for a couple of weeks. However,... (1 Reply)
Discussion started by: cjs226
1 Replies

9. UNIX for Advanced & Expert Users

reporting NS-12564 error as ORA-12564

Hi My client connection to RAC Oracle Release 10.2.0.4.0 database suddenly stopped working. ACPT_1 - works but not with OEM. ACPT_2 - does not work at all. Getting error ORA-12564: TNS:connection refused Any ideas very much appreciated Thanks ACPT_1 = (DESCRIPTION = ... (4 Replies)
Discussion started by: zam
4 Replies

10. Solaris

connection problem with Storedge D1000

Hi, Recently i was trying to connect Sun Storedge D1000 Array to E420 R (Practice servers). I connected the SCSI cable between array and server. I tried the following : #devfsadm (nothing showed up) #format (no new disk is shown here) i tried this process again after putting ON the... (2 Replies)
Discussion started by: bluegold86
2 Replies

11. Programming

Problem with socket connection

I have a client /server file operation program.It works properly when i run the client and server program in the same system.but when i try to run the client in one system and server in another system i am getting an error in the cleint machine as "ERROR:Connection refused". Plz help me in this ... (1 Reply)
Discussion started by: vigneshinbox
1 Replies

12. UNIX for Dummies Questions & Answers

Get files using https mode in unix scripts

Hello Friends, I have a requirement to connect and get files from a server using https protocol. 1) COuld you please advise on how to establish connection between my server and remote server to get files using https mode. any special procedure apart from FTP ? 2) also give me some code... (5 Replies)
Discussion started by: mohanpadamata
5 Replies

13. Cybersecurity

How to access private IP address?

HI, I'm doing a research on client/server connection. I need to run the server code to open socket connection with the client code. To make the test real, I need to run the server code from a a machine far away from the client over the Internet. IN ORDER TO RUN THE CODE, the client has to know the... (3 Replies)
Discussion started by: ENG_MOHD
3 Replies

14. UNIX for Dummies Questions & Answers

winscp error: Network error connection timed out

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

15. UNIX for Dummies Questions & Answers

UNIX string connection to sql server db

Hi, i have to perform a connection from unix to sql server database, using TCP protocol. I have all connection parameters (user,pwd,server_name,port,db_name). How can i perform this connection, by unix console ? is it available a command similar to this one (for oracle): sqlplus... (1 Reply)
Discussion started by: nash83
1 Replies