Skip to content

Commit

Permalink
Add PostgreSQL version information to conditional functions
Browse files Browse the repository at this point in the history
  • Loading branch information
larskanis authored Aug 2, 2017
1 parent 8f10d21 commit 12b3b49
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ext/pg_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,8 @@ pgconn_s_connect_start( int argc, VALUE *argv, VALUE klass )
* could not establish connection
* [+PQPING_NO_ATTEMPT+]
* connection not attempted (bad params)
*
* Available since PostgreSQL-9.1
*/
static VALUE
pgconn_s_ping( int argc, VALUE *argv, VALUE klass )
Expand Down Expand Up @@ -686,6 +688,7 @@ pgconn_options(VALUE self)
*
* Returns the connection options used by a live connection.
*
* Available since PostgreSQL-9.3
*/
static VALUE
pgconn_conninfo( VALUE self )
Expand Down Expand Up @@ -1652,6 +1655,8 @@ pgconn_s_unescape_bytea(VALUE self, VALUE str)
* conn.escape_literal( str ) -> String
*
* Escape an arbitrary String +str+ as a literal.
*
* Available since PostgreSQL-9.0
*/
static VALUE
pgconn_escape_literal(VALUE self, VALUE string)
Expand Down Expand Up @@ -1694,6 +1699,8 @@ pgconn_escape_literal(VALUE self, VALUE string)
* This method does the same as #quote_ident with a String argument,
* but it doesn't support an Array argument and it makes use of libpq
* to process the string.
*
* Available since PostgreSQL-9.0
*/
static VALUE
pgconn_escape_identifier(VALUE self, VALUE string)
Expand Down Expand Up @@ -1763,6 +1770,7 @@ pgconn_escape_identifier(VALUE self, VALUE string)
* end
* end
*
* Available since PostgreSQL-9.2
*/
static VALUE
pgconn_set_single_row_mode(VALUE self)
Expand Down Expand Up @@ -3198,14 +3206,13 @@ pgconn_async_exec(int argc, VALUE *argv, VALUE self)


#ifdef HAVE_PQSSLATTRIBUTE
/* Since PostgreSQL-9.5: */

/*
* call-seq:
* conn.ssl_in_use? -> Boolean
*
* Returns +true+ if the connection uses SSL, +false+ if not.
*
* Available since PostgreSQL-9.5
*/
static VALUE
pgconn_ssl_in_use(VALUE self)
Expand Down Expand Up @@ -3238,6 +3245,8 @@ pgconn_ssl_in_use(VALUE self)
*
*
* See also #ssl_attribute_names and http://www.postgresql.org/docs/current/interactive/libpq-status.html#LIBPQ-PQSSLATTRIBUTE
*
* Available since PostgreSQL-9.5
*/
static VALUE
pgconn_ssl_attribute(VALUE self, VALUE attribute_name)
Expand All @@ -3256,6 +3265,7 @@ pgconn_ssl_attribute(VALUE self, VALUE attribute_name)
*
* See also #ssl_attribute
*
* Available since PostgreSQL-9.5
*/
static VALUE
pgconn_ssl_attribute_names(VALUE self)
Expand Down

0 comments on commit 12b3b49

Please sign in to comment.