pg 0.11.0 → 0.12.0pre258
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gemtest +0 -0
- data/Contributors.rdoc +37 -0
- data/History.rdoc +60 -0
- data/Manifest.txt +39 -0
- data/README.OS_X.rdoc +68 -0
- data/README.ja.rdoc +7 -0
- data/{README → README.rdoc} +33 -18
- data/{README.windows → README.windows.rdoc} +20 -26
- data/Rakefile +98 -324
- data/ext/extconf.rb +7 -2
- data/ext/pg.c +173 -35
- data/ext/vc/pg.sln +26 -0
- data/ext/vc/pg_18/pg.vcproj +216 -0
- data/ext/vc/pg_19/pg_19.vcproj +209 -0
- data/lib/pg.rb +5 -7
- data/misc/openssl-pg-segfault.rb +31 -0
- data/sample/async_api.rb +109 -0
- data/sample/copyfrom.rb +81 -0
- data/sample/copyto.rb +23 -0
- data/sample/losample.rb +69 -0
- data/sample/notify_wait.rb +43 -0
- data/sample/psql.rb +1181 -0
- data/sample/psqlHelp.rb +158 -0
- data/sample/test1.rb +60 -0
- data/sample/test2.rb +44 -0
- data/sample/test4.rb +71 -0
- data/sample/test_binary_values.rb +35 -0
- data/spec/m17n_spec.rb +1 -1
- data/spec/pgconn_spec.rb +50 -5
- data/spec/pgresult_spec.rb +1 -1
- metadata +142 -66
- data.tar.gz.sig +0 -2
- data/ChangeLog +0 -693
- data/Contributors +0 -32
- data/README.OS_X +0 -19
- data/README.ja +0 -183
- data/Rakefile.local +0 -312
- data/rake/191_compat.rb +0 -26
- data/rake/dependencies.rb +0 -76
- data/rake/documentation.rb +0 -123
- data/rake/helpers.rb +0 -502
- data/rake/hg.rb +0 -318
- data/rake/manual.rb +0 -787
- data/rake/packaging.rb +0 -129
- data/rake/publishing.rb +0 -341
- data/rake/style.rb +0 -62
- data/rake/svn.rb +0 -668
- data/rake/testing.rb +0 -152
- data/rake/verifytask.rb +0 -64
- metadata.gz.sig +0 -0
data/ext/extconf.rb
CHANGED
@@ -2,6 +2,11 @@ require 'pp'
|
|
2
2
|
require 'mkmf'
|
3
3
|
|
4
4
|
|
5
|
+
if ENV['MAINTAINER_MODE']
|
6
|
+
$stderr.puts "Maintainer mode enabled."
|
7
|
+
$CFLAGS << ' -Wall' << ' -ggdb' << ' -DDEBUG'
|
8
|
+
end
|
9
|
+
|
5
10
|
if pgdir = with_config( 'pg' )
|
6
11
|
ENV['PATH'] = "#{pgdir}/bin" + File::PATH_SEPARATOR + ENV['PATH']
|
7
12
|
end
|
@@ -21,8 +26,8 @@ dir_config 'pg'
|
|
21
26
|
|
22
27
|
if pgconfig = ( with_config('pg-config') || with_config('pg_config') || find_executable('pg_config') )
|
23
28
|
$stderr.puts "Using config values from %s" % [ pgconfig ]
|
24
|
-
$CPPFLAGS << " -I%s" % [
|
25
|
-
$LDFLAGS << " -L%s" % [
|
29
|
+
$CPPFLAGS << " -I%s" % [ `"#{pgconfig}" --includedir`.chomp ]
|
30
|
+
$LDFLAGS << " -L%s" % [ `"#{pgconfig}" --libdir`.chomp ]
|
26
31
|
else
|
27
32
|
$stderr.puts "No pg_config... trying anyway. If building fails, please try again with",
|
28
33
|
" --with-pg-config=/path/to/pg_config"
|
data/ext/pg.c
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
modified at: Wed Jan 20 16:41:51 1999
|
10
10
|
|
11
11
|
$Author: ged $
|
12
|
-
$Date: 2011/
|
12
|
+
$Date: 2011/10/07 20:24:14 $
|
13
13
|
************************************************/
|
14
14
|
|
15
15
|
#include "pg.h"
|
@@ -28,7 +28,7 @@ static VALUE rb_cPGconn;
|
|
28
28
|
static VALUE rb_cPGresult;
|
29
29
|
static VALUE rb_ePGError;
|
30
30
|
|
31
|
-
static const char *VERSION = "0.
|
31
|
+
static const char *VERSION = "0.12.0";
|
32
32
|
|
33
33
|
|
34
34
|
/* The following functions are part of libpq, but not
|
@@ -293,7 +293,7 @@ pgconn_alloc(VALUE klass)
|
|
293
293
|
* If the Ruby default internal encoding is set (i.e., Encoding.default_internal != nil), the
|
294
294
|
* connection will have its +client_encoding+ set accordingly.
|
295
295
|
*
|
296
|
-
*
|
296
|
+
* Raises a PGError if the connection fails.
|
297
297
|
*/
|
298
298
|
static VALUE
|
299
299
|
pgconn_init(int argc, VALUE *argv, VALUE self)
|
@@ -784,7 +784,7 @@ pgconn_server_version(VALUE self)
|
|
784
784
|
|
785
785
|
/*
|
786
786
|
* call-seq:
|
787
|
-
* conn.
|
787
|
+
* conn.error_message -> String
|
788
788
|
*
|
789
789
|
* Returns the error message about connection.
|
790
790
|
*/
|
@@ -1285,7 +1285,6 @@ pgconn_make_empty_pgresult(VALUE self, VALUE status)
|
|
1285
1285
|
/*
|
1286
1286
|
* call-seq:
|
1287
1287
|
* conn.escape_string( str ) -> String
|
1288
|
-
* PGconn.escape_string( str ) -> String # DEPRECATED
|
1289
1288
|
*
|
1290
1289
|
* Connection instance method for versions of 8.1 and higher of libpq
|
1291
1290
|
* uses PQescapeStringConn, which is safer. Avoid calling as a class method,
|
@@ -1343,7 +1342,6 @@ pgconn_s_escape(VALUE self, VALUE string)
|
|
1343
1342
|
/*
|
1344
1343
|
* call-seq:
|
1345
1344
|
* conn.escape_bytea( string ) -> String
|
1346
|
-
* PGconn.escape_bytea( string ) -> String # DEPRECATED
|
1347
1345
|
*
|
1348
1346
|
* Connection instance method for versions of 8.1 and higher of libpq
|
1349
1347
|
* uses PQescapeByteaConn, which is safer. Avoid calling as a class method,
|
@@ -2056,6 +2054,7 @@ void cleanup_crt_fd(fd_set *os_set, fd_set *crt_set)
|
|
2056
2054
|
* call-seq:
|
2057
2055
|
* conn.wait_for_notify( [ timeout ] ) -> String
|
2058
2056
|
* conn.wait_for_notify( [ timeout ] ) { |event, pid| block }
|
2057
|
+
* conn.wait_for_notify( [ timeout ] ) { |event, pid, payload| block } # PostgreSQL 9.0
|
2059
2058
|
*
|
2060
2059
|
* Blocks while waiting for notification(s), or until the optional
|
2061
2060
|
* _timeout_ is reached, whichever comes first. _timeout_ is
|
@@ -2065,6 +2064,10 @@ void cleanup_crt_fd(fd_set *os_set, fd_set *crt_set)
|
|
2065
2064
|
* event otherwise. If used in block form, passes the name of the
|
2066
2065
|
* NOTIFY +event+ and the generating +pid+ into the block.
|
2067
2066
|
*
|
2067
|
+
* Under PostgreSQL 9.0 and later, if the notification is sent with
|
2068
|
+
* the optional +payload+ string, it will be given to the block as the
|
2069
|
+
* third argument.
|
2070
|
+
*
|
2068
2071
|
*/
|
2069
2072
|
static VALUE
|
2070
2073
|
pgconn_wait_for_notify(int argc, VALUE *argv, VALUE self)
|
@@ -2075,7 +2078,7 @@ pgconn_wait_for_notify(int argc, VALUE *argv, VALUE self)
|
|
2075
2078
|
int ret;
|
2076
2079
|
struct timeval timeout;
|
2077
2080
|
struct timeval *ptimeout = NULL;
|
2078
|
-
VALUE timeout_in, relname = Qnil, be_pid = Qnil, extra = Qnil;
|
2081
|
+
VALUE timeout_in = Qnil, relname = Qnil, be_pid = Qnil, extra = Qnil;
|
2079
2082
|
double timeout_sec;
|
2080
2083
|
fd_set sd_rset;
|
2081
2084
|
#ifdef _WIN32
|
@@ -2085,7 +2088,9 @@ pgconn_wait_for_notify(int argc, VALUE *argv, VALUE self)
|
|
2085
2088
|
if ( sd < 0 )
|
2086
2089
|
rb_bug( "PQsocket(conn): couldn't fetch the connection's socket!" );
|
2087
2090
|
|
2088
|
-
|
2091
|
+
rb_scan_args( argc, argv, "01", &timeout_in );
|
2092
|
+
|
2093
|
+
if ( RTEST(timeout_in) ) {
|
2089
2094
|
timeout_sec = NUM2DBL( timeout_in );
|
2090
2095
|
timeout.tv_sec = (long)timeout_sec;
|
2091
2096
|
timeout.tv_usec = (long)( (timeout_sec - (long)timeout_sec) * 1e6 );
|
@@ -2120,9 +2125,13 @@ pgconn_wait_for_notify(int argc, VALUE *argv, VALUE self)
|
|
2120
2125
|
}
|
2121
2126
|
|
2122
2127
|
relname = rb_tainted_str_new2( notification->relname );
|
2128
|
+
ASSOCIATE_INDEX( relname, self );
|
2123
2129
|
be_pid = INT2NUM( notification->be_pid );
|
2124
2130
|
#ifdef HAVE_ST_NOTIFY_EXTRA
|
2125
|
-
|
2131
|
+
if ( *notification->extra ) {
|
2132
|
+
extra = rb_tainted_str_new2( notification->extra );
|
2133
|
+
ASSOCIATE_INDEX( extra, self );
|
2134
|
+
}
|
2126
2135
|
#endif
|
2127
2136
|
PQfreemem( notification );
|
2128
2137
|
|
@@ -2483,6 +2492,7 @@ pgconn_transaction(VALUE self)
|
|
2483
2492
|
return Qnil;
|
2484
2493
|
}
|
2485
2494
|
|
2495
|
+
|
2486
2496
|
/*
|
2487
2497
|
* call-seq:
|
2488
2498
|
* PGconn.quote_ident( str ) -> String
|
@@ -2532,6 +2542,8 @@ pgconn_s_quote_ident(VALUE self, VALUE in_str)
|
|
2532
2542
|
}
|
2533
2543
|
|
2534
2544
|
|
2545
|
+
#ifndef _WIN32
|
2546
|
+
|
2535
2547
|
/*
|
2536
2548
|
* call-seq:
|
2537
2549
|
* conn.block( [ timeout ] ) -> Boolean
|
@@ -2547,27 +2559,152 @@ pgconn_s_quote_ident(VALUE self, VALUE in_str)
|
|
2547
2559
|
*/
|
2548
2560
|
static VALUE
|
2549
2561
|
pgconn_block( int argc, VALUE *argv, VALUE self ) {
|
2550
|
-
PGconn *conn = get_pgconn(self);
|
2551
|
-
int sd = PQsocket(conn);
|
2562
|
+
PGconn *conn = get_pgconn( self );
|
2563
|
+
int sd = PQsocket( conn );
|
2552
2564
|
int ret;
|
2565
|
+
|
2566
|
+
/* If WIN32 and Ruby 1.9 do not use rb_thread_select() which sometimes hangs
|
2567
|
+
* and does not wait (nor sleep) any time even if timeout is given.
|
2568
|
+
* Instead use the Winsock events and rb_w32_wait_events(). */
|
2569
|
+
|
2553
2570
|
struct timeval timeout;
|
2554
2571
|
struct timeval *ptimeout = NULL;
|
2572
|
+
fd_set sd_rset;
|
2573
|
+
VALUE timeout_in;
|
2574
|
+
double timeout_sec;
|
2575
|
+
|
2576
|
+
if ( rb_scan_args(argc, argv, "01", &timeout_in) == 1 ) {
|
2577
|
+
timeout_sec = NUM2DBL( timeout_in );
|
2578
|
+
timeout.tv_sec = (long)timeout_sec;
|
2579
|
+
timeout.tv_usec = (long)((timeout_sec - (long)timeout_sec) * 1e6);
|
2580
|
+
ptimeout = &timeout;
|
2581
|
+
}
|
2582
|
+
|
2583
|
+
/* Check for connection errors (PQisBusy is true on connection errors) */
|
2584
|
+
if ( PQconsumeInput(conn) == 0 )
|
2585
|
+
rb_raise( rb_ePGError, PQerrorMessage(conn) );
|
2586
|
+
|
2587
|
+
while ( PQisBusy(conn) ) {
|
2588
|
+
FD_ZERO( &sd_rset );
|
2589
|
+
FD_SET( sd, &sd_rset );
|
2590
|
+
|
2591
|
+
if ( (ret = rb_thread_select( sd+1, &sd_rset, NULL, NULL, ptimeout )) < 0 )
|
2592
|
+
rb_sys_fail( "rb_thread_select()" ); /* Raises */
|
2593
|
+
|
2594
|
+
/* Return false if there was a timeout argument and the select() timed out */
|
2595
|
+
if ( ret == 0 && argc )
|
2596
|
+
return Qfalse;
|
2597
|
+
|
2598
|
+
/* Check for connection errors (PQisBusy is true on connection errors) */
|
2599
|
+
if ( PQconsumeInput(conn) == 0 )
|
2600
|
+
rb_raise( rb_ePGError, PQerrorMessage(conn) );
|
2601
|
+
}
|
2602
|
+
|
2603
|
+
return Qtrue;
|
2604
|
+
}
|
2605
|
+
|
2606
|
+
|
2607
|
+
#else /* _WIN32 */
|
2608
|
+
|
2609
|
+
/*
|
2610
|
+
* Win32 PGconn#block -- on Windows, use platform-specific strategies to wait for the socket
|
2611
|
+
* instead of rb_thread_select().
|
2612
|
+
*/
|
2613
|
+
|
2614
|
+
/* Win32 + Ruby 1.9+ */
|
2615
|
+
#ifdef HAVE_RUBY_VM_H
|
2616
|
+
|
2617
|
+
int rb_w32_wait_events( HANDLE *events, int num, DWORD timeout );
|
2618
|
+
|
2619
|
+
/* If WIN32 and Ruby 1.9 do not use rb_thread_select() which sometimes hangs
|
2620
|
+
* and does not wait (nor sleep) any time even if timeout is given.
|
2621
|
+
* Instead use the Winsock events and rb_w32_wait_events(). */
|
2622
|
+
|
2623
|
+
static VALUE
|
2624
|
+
pgconn_block( int argc, VALUE *argv, VALUE self ) {
|
2625
|
+
PGconn *conn = get_pgconn( self );
|
2626
|
+
int sd = PQsocket( conn );
|
2627
|
+
int ret;
|
2628
|
+
|
2629
|
+
DWORD timeout_milisec = INFINITY;
|
2630
|
+
DWORD wait_ret;
|
2631
|
+
WSAEVENT hEvent;
|
2555
2632
|
VALUE timeout_in;
|
2556
2633
|
double timeout_sec;
|
2634
|
+
|
2635
|
+
hEvent = WSACreateEvent();
|
2636
|
+
|
2637
|
+
if ( rb_scan_args(argc, argv, "01", &timeout_in) == 1 ) {
|
2638
|
+
timeout_sec = NUM2DBL( timeout_in );
|
2639
|
+
timeout_milisec = (DWORD)( (timeout_sec - (DWORD)timeout_sec) * 1e3 );
|
2640
|
+
}
|
2641
|
+
|
2642
|
+
/* Check for connection errors (PQisBusy is true on connection errors) */
|
2643
|
+
if( PQconsumeInput(conn) == 0 ) {
|
2644
|
+
WSACloseEvent( hEvent );
|
2645
|
+
rb_raise( rb_ePGError, PQerrorMessage(conn) );
|
2646
|
+
}
|
2647
|
+
|
2648
|
+
while ( PQisBusy(conn) ) {
|
2649
|
+
if ( WSAEventSelect(sd, hEvent, FD_READ|FD_CLOSE) == SOCKET_ERROR ) {
|
2650
|
+
WSACloseEvent( hEvent );
|
2651
|
+
rb_raise( rb_ePGError, "WSAEventSelect socket error: %d", WSAGetLastError() );
|
2652
|
+
}
|
2653
|
+
|
2654
|
+
wait_ret = rb_w32_wait_events( &hEvent, 1, 100 );
|
2655
|
+
|
2656
|
+
if ( wait_ret == WAIT_TIMEOUT ) {
|
2657
|
+
ret = 0;
|
2658
|
+
} else if ( wait_ret == WAIT_OBJECT_0 ) {
|
2659
|
+
ret = 1;
|
2660
|
+
} else if ( wait_ret == WAIT_FAILED ) {
|
2661
|
+
WSACloseEvent( hEvent );
|
2662
|
+
rb_raise( rb_ePGError, "Wait on socket error (WaitForMultipleObjects): %d", GetLastError() );
|
2663
|
+
} else {
|
2664
|
+
WSACloseEvent( hEvent );
|
2665
|
+
rb_raise( rb_ePGError, "Wait on socket abandoned (WaitForMultipleObjects)" );
|
2666
|
+
}
|
2667
|
+
|
2668
|
+
/* Return false if there was a timeout argument and the select() timed out */
|
2669
|
+
if ( ret == 0 && argc ) {
|
2670
|
+
WSACloseEvent( hEvent );
|
2671
|
+
return Qfalse;
|
2672
|
+
}
|
2673
|
+
|
2674
|
+
/* Check for connection errors (PQisBusy is true on connection errors) */
|
2675
|
+
if ( PQconsumeInput(conn) == 0 ) {
|
2676
|
+
WSACloseEvent( hEvent );
|
2677
|
+
rb_raise( rb_ePGError, PQerrorMessage(conn) );
|
2678
|
+
}
|
2679
|
+
}
|
2680
|
+
|
2681
|
+
WSACloseEvent( hEvent );
|
2682
|
+
|
2683
|
+
return Qtrue;
|
2684
|
+
}
|
2685
|
+
|
2686
|
+
#else /* Win32 + Ruby < 1.9 */
|
2687
|
+
|
2688
|
+
static VALUE
|
2689
|
+
pgconn_block( int argc, VALUE *argv, VALUE self ) {
|
2690
|
+
PGconn *conn = get_pgconn( self );
|
2691
|
+
int sd = PQsocket( conn );
|
2692
|
+
int ret;
|
2693
|
+
|
2694
|
+
struct timeval timeout;
|
2695
|
+
struct timeval *ptimeout = NULL;
|
2557
2696
|
fd_set sd_rset;
|
2558
|
-
#ifdef _WIN32
|
2559
2697
|
fd_set crt_sd_rset;
|
2560
|
-
|
2698
|
+
VALUE timeout_in;
|
2699
|
+
double timeout_sec;
|
2561
2700
|
|
2562
|
-
/* Always set a timeout
|
2701
|
+
/* Always set a timeout, as rb_thread_select() sometimes
|
2563
2702
|
* doesn't return when a second ruby thread is running although data
|
2564
2703
|
* could be read. So we use timeout-based polling instead.
|
2565
2704
|
*/
|
2566
|
-
#if defined(_WIN32)
|
2567
2705
|
timeout.tv_sec = 0;
|
2568
|
-
timeout.tv_usec = 10000;
|
2706
|
+
timeout.tv_usec = 10000; // 10ms
|
2569
2707
|
ptimeout = &timeout;
|
2570
|
-
#endif
|
2571
2708
|
|
2572
2709
|
if ( rb_scan_args(argc, argv, "01", &timeout_in) == 1 ) {
|
2573
2710
|
timeout_sec = NUM2DBL( timeout_in );
|
@@ -2576,32 +2713,33 @@ pgconn_block( int argc, VALUE *argv, VALUE self ) {
|
|
2576
2713
|
ptimeout = &timeout;
|
2577
2714
|
}
|
2578
2715
|
|
2579
|
-
|
2716
|
+
/* Check for connection errors (PQisBusy is true on connection errors) */
|
2717
|
+
if( PQconsumeInput(conn) == 0 )
|
2718
|
+
rb_raise( rb_ePGError, PQerrorMessage(conn) );
|
2580
2719
|
|
2581
2720
|
while ( PQisBusy(conn) ) {
|
2582
2721
|
FD_ZERO( &sd_rset );
|
2583
2722
|
FD_SET( sd, &sd_rset );
|
2584
2723
|
|
2585
|
-
|
2586
|
-
|
2587
|
-
|
2588
|
-
|
2589
|
-
ret = rb_thread_select (sd+1, &sd_rset, NULL, NULL, ptimeout );
|
2590
|
-
|
2591
|
-
#ifdef _WIN32
|
2592
|
-
cleanup_crt_fd(&sd_rset, &crt_sd_rset);
|
2593
|
-
#endif
|
2724
|
+
create_crt_fd( &sd_rset, &crt_sd_rset );
|
2725
|
+
ret = rb_thread_select( sd+1, &sd_rset, NULL, NULL, ptimeout );
|
2726
|
+
cleanup_crt_fd( &sd_rset, &crt_sd_rset );
|
2594
2727
|
|
2595
2728
|
/* Return false if there was a timeout argument and the select() timed out */
|
2596
|
-
if ( ret == 0 && argc )
|
2729
|
+
if ( ret == 0 && argc )
|
2597
2730
|
return Qfalse;
|
2598
2731
|
|
2599
|
-
|
2600
|
-
|
2732
|
+
/* Check for connection errors (PQisBusy is true on connection errors) */
|
2733
|
+
if ( PQconsumeInput(conn) == 0 )
|
2734
|
+
rb_raise( rb_ePGError, PQerrorMessage(conn) );
|
2735
|
+
}
|
2601
2736
|
|
2602
2737
|
return Qtrue;
|
2603
2738
|
}
|
2604
2739
|
|
2740
|
+
#endif /* Ruby 1.9 */
|
2741
|
+
#endif /* Win32 */
|
2742
|
+
|
2605
2743
|
|
2606
2744
|
/*
|
2607
2745
|
* call-seq:
|
@@ -2663,6 +2801,7 @@ pgconn_async_exec(int argc, VALUE *argv, VALUE self)
|
|
2663
2801
|
VALUE rb_pgresult = Qnil;
|
2664
2802
|
|
2665
2803
|
/* remove any remaining results from the queue */
|
2804
|
+
pgconn_block( 0, NULL, self ); /* wait for input (without blocking) before reading the last result */
|
2666
2805
|
pgconn_get_last_result( self );
|
2667
2806
|
|
2668
2807
|
pgconn_send_query( argc, argv, self );
|
@@ -3068,10 +3207,10 @@ pgresult_result_error_message(VALUE self)
|
|
3068
3207
|
static VALUE
|
3069
3208
|
pgresult_result_error_field(VALUE self, VALUE field)
|
3070
3209
|
{
|
3071
|
-
PGresult *result = get_pgresult(self);
|
3072
|
-
int fieldcode = NUM2INT(field);
|
3073
|
-
|
3074
|
-
ASSOCIATE_INDEX(ret, self);
|
3210
|
+
PGresult *result = get_pgresult( self );
|
3211
|
+
int fieldcode = NUM2INT( field );
|
3212
|
+
VALUE ret = rb_tainted_str_new2( PQresultErrorField(result, fieldcode) );
|
3213
|
+
ASSOCIATE_INDEX( ret, self );
|
3075
3214
|
return ret;
|
3076
3215
|
}
|
3077
3216
|
|
@@ -4004,7 +4143,6 @@ Init_pg_ext()
|
|
4004
4143
|
rb_define_singleton_method(rb_cPGconn, "quote_ident", pgconn_s_quote_ident, 1);
|
4005
4144
|
rb_define_singleton_method(rb_cPGconn, "connect_start", pgconn_s_connect_start, -1);
|
4006
4145
|
rb_define_singleton_method(rb_cPGconn, "conndefaults", pgconn_s_conndefaults, 0);
|
4007
|
-
|
4008
4146
|
|
4009
4147
|
/****** PGconn CLASS CONSTANTS: Connection Status ******/
|
4010
4148
|
|
data/ext/vc/pg.sln
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
Microsoft Visual Studio Solution File, Format Version 10.00
|
3
|
+
# Visual Studio 2008
|
4
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pg", "pg_18\pg.vcproj", "{9A8BF0C8-1D75-4DC0-8D84-BAEFD693795E}"
|
5
|
+
EndProject
|
6
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pg_19", "pg_19\pg_19.vcproj", "{2EE30C74-074F-4611-B39B-38D5F3C9B071}"
|
7
|
+
EndProject
|
8
|
+
Global
|
9
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
10
|
+
Debug|Win32 = Debug|Win32
|
11
|
+
Release|Win32 = Release|Win32
|
12
|
+
EndGlobalSection
|
13
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
14
|
+
{9A8BF0C8-1D75-4DC0-8D84-BAEFD693795E}.Debug|Win32.ActiveCfg = Debug|Win32
|
15
|
+
{9A8BF0C8-1D75-4DC0-8D84-BAEFD693795E}.Debug|Win32.Build.0 = Debug|Win32
|
16
|
+
{9A8BF0C8-1D75-4DC0-8D84-BAEFD693795E}.Release|Win32.ActiveCfg = Release|Win32
|
17
|
+
{9A8BF0C8-1D75-4DC0-8D84-BAEFD693795E}.Release|Win32.Build.0 = Release|Win32
|
18
|
+
{2EE30C74-074F-4611-B39B-38D5F3C9B071}.Debug|Win32.ActiveCfg = Debug|Win32
|
19
|
+
{2EE30C74-074F-4611-B39B-38D5F3C9B071}.Debug|Win32.Build.0 = Debug|Win32
|
20
|
+
{2EE30C74-074F-4611-B39B-38D5F3C9B071}.Release|Win32.ActiveCfg = Release|Win32
|
21
|
+
{2EE30C74-074F-4611-B39B-38D5F3C9B071}.Release|Win32.Build.0 = Release|Win32
|
22
|
+
EndGlobalSection
|
23
|
+
GlobalSection(SolutionProperties) = preSolution
|
24
|
+
HideSolutionNode = FALSE
|
25
|
+
EndGlobalSection
|
26
|
+
EndGlobal
|
@@ -0,0 +1,216 @@
|
|
1
|
+
<?xml version="1.0" encoding="Windows-1252"?>
|
2
|
+
<VisualStudioProject
|
3
|
+
ProjectType="Visual C++"
|
4
|
+
Version="9.00"
|
5
|
+
Name="pg"
|
6
|
+
ProjectGUID="{9A8BF0C8-1D75-4DC0-8D84-BAEFD693795E}"
|
7
|
+
RootNamespace="pg"
|
8
|
+
Keyword="Win32Proj"
|
9
|
+
TargetFrameworkVersion="196613"
|
10
|
+
>
|
11
|
+
<Platforms>
|
12
|
+
<Platform
|
13
|
+
Name="Win32"
|
14
|
+
/>
|
15
|
+
</Platforms>
|
16
|
+
<ToolFiles>
|
17
|
+
</ToolFiles>
|
18
|
+
<Configurations>
|
19
|
+
<Configuration
|
20
|
+
Name="Debug|Win32"
|
21
|
+
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
22
|
+
IntermediateDirectory="$(ConfigurationName)"
|
23
|
+
ConfigurationType="2"
|
24
|
+
CharacterSet="1"
|
25
|
+
>
|
26
|
+
<Tool
|
27
|
+
Name="VCPreBuildEventTool"
|
28
|
+
/>
|
29
|
+
<Tool
|
30
|
+
Name="VCCustomBuildTool"
|
31
|
+
/>
|
32
|
+
<Tool
|
33
|
+
Name="VCXMLDataGeneratorTool"
|
34
|
+
/>
|
35
|
+
<Tool
|
36
|
+
Name="VCWebServiceProxyGeneratorTool"
|
37
|
+
/>
|
38
|
+
<Tool
|
39
|
+
Name="VCMIDLTool"
|
40
|
+
/>
|
41
|
+
<Tool
|
42
|
+
Name="VCCLCompilerTool"
|
43
|
+
Optimization="0"
|
44
|
+
AdditionalIncludeDirectories=""C:\Development\ruby\lib\ruby\1.8\i386-mswin32";C:\Development\msys\local\include"
|
45
|
+
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PG_EXPORTS;HAVE_LIBPQ_FE_H;HAVE_LIBPQ_LIBPQ_FS_H;HAVE_PQCONNECTIONUSEDPASSWORD;HAVE_PQISTHREADSAFE;HAVE_LO_CREATE;HAVE_PQPREPARE;HAVE_PQEXECPARAMS;HAVE_PQESCAPESTRING;HAVE_PQESCAPESTRINGCONN;HAVE_PG_ENCODING_TO_CHAR;HAVE_PQSETCLIENTENCODING"
|
46
|
+
MinimalRebuild="true"
|
47
|
+
BasicRuntimeChecks="3"
|
48
|
+
RuntimeLibrary="3"
|
49
|
+
UsePrecompiledHeader="0"
|
50
|
+
WarningLevel="3"
|
51
|
+
DebugInformationFormat="4"
|
52
|
+
DisableSpecificWarnings="4996"
|
53
|
+
/>
|
54
|
+
<Tool
|
55
|
+
Name="VCManagedResourceCompilerTool"
|
56
|
+
/>
|
57
|
+
<Tool
|
58
|
+
Name="VCResourceCompilerTool"
|
59
|
+
/>
|
60
|
+
<Tool
|
61
|
+
Name="VCPreLinkEventTool"
|
62
|
+
/>
|
63
|
+
<Tool
|
64
|
+
Name="VCLinkerTool"
|
65
|
+
AdditionalDependencies="libpq.lib msvcrt-ruby18.lib"
|
66
|
+
OutputFile="C:\Development\ruby\lib\ruby\gems\1.8\gems\pg-0.7.9.2009.03.14-x86-mswin32-60\lib\$(ProjectName).so"
|
67
|
+
LinkIncremental="2"
|
68
|
+
AdditionalLibraryDirectories="C:\Development\ruby\lib;C:\Development\msys\local\lib"
|
69
|
+
GenerateDebugInformation="true"
|
70
|
+
SubSystem="2"
|
71
|
+
TargetMachine="1"
|
72
|
+
/>
|
73
|
+
<Tool
|
74
|
+
Name="VCALinkTool"
|
75
|
+
/>
|
76
|
+
<Tool
|
77
|
+
Name="VCManifestTool"
|
78
|
+
/>
|
79
|
+
<Tool
|
80
|
+
Name="VCXDCMakeTool"
|
81
|
+
/>
|
82
|
+
<Tool
|
83
|
+
Name="VCBscMakeTool"
|
84
|
+
/>
|
85
|
+
<Tool
|
86
|
+
Name="VCFxCopTool"
|
87
|
+
/>
|
88
|
+
<Tool
|
89
|
+
Name="VCAppVerifierTool"
|
90
|
+
/>
|
91
|
+
<Tool
|
92
|
+
Name="VCPostBuildEventTool"
|
93
|
+
/>
|
94
|
+
</Configuration>
|
95
|
+
<Configuration
|
96
|
+
Name="Release|Win32"
|
97
|
+
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
98
|
+
IntermediateDirectory="$(ConfigurationName)"
|
99
|
+
ConfigurationType="2"
|
100
|
+
CharacterSet="1"
|
101
|
+
WholeProgramOptimization="1"
|
102
|
+
>
|
103
|
+
<Tool
|
104
|
+
Name="VCPreBuildEventTool"
|
105
|
+
/>
|
106
|
+
<Tool
|
107
|
+
Name="VCCustomBuildTool"
|
108
|
+
/>
|
109
|
+
<Tool
|
110
|
+
Name="VCXMLDataGeneratorTool"
|
111
|
+
/>
|
112
|
+
<Tool
|
113
|
+
Name="VCWebServiceProxyGeneratorTool"
|
114
|
+
/>
|
115
|
+
<Tool
|
116
|
+
Name="VCMIDLTool"
|
117
|
+
/>
|
118
|
+
<Tool
|
119
|
+
Name="VCCLCompilerTool"
|
120
|
+
Optimization="2"
|
121
|
+
EnableIntrinsicFunctions="true"
|
122
|
+
AdditionalIncludeDirectories="C:\Development\msys\local\include;"C:\Development\ruby\lib\ruby\1.8\i386-mswin32_90""
|
123
|
+
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PG_EXPORTS"
|
124
|
+
RuntimeLibrary="2"
|
125
|
+
EnableFunctionLevelLinking="true"
|
126
|
+
UsePrecompiledHeader="2"
|
127
|
+
WarningLevel="3"
|
128
|
+
DebugInformationFormat="3"
|
129
|
+
/>
|
130
|
+
<Tool
|
131
|
+
Name="VCManagedResourceCompilerTool"
|
132
|
+
/>
|
133
|
+
<Tool
|
134
|
+
Name="VCResourceCompilerTool"
|
135
|
+
/>
|
136
|
+
<Tool
|
137
|
+
Name="VCPreLinkEventTool"
|
138
|
+
/>
|
139
|
+
<Tool
|
140
|
+
Name="VCLinkerTool"
|
141
|
+
OutputFile="$(OutDir)\$(ProjectName).so"
|
142
|
+
LinkIncremental="1"
|
143
|
+
GenerateDebugInformation="true"
|
144
|
+
SubSystem="2"
|
145
|
+
OptimizeReferences="2"
|
146
|
+
EnableCOMDATFolding="2"
|
147
|
+
TargetMachine="1"
|
148
|
+
/>
|
149
|
+
<Tool
|
150
|
+
Name="VCALinkTool"
|
151
|
+
/>
|
152
|
+
<Tool
|
153
|
+
Name="VCManifestTool"
|
154
|
+
/>
|
155
|
+
<Tool
|
156
|
+
Name="VCXDCMakeTool"
|
157
|
+
/>
|
158
|
+
<Tool
|
159
|
+
Name="VCBscMakeTool"
|
160
|
+
/>
|
161
|
+
<Tool
|
162
|
+
Name="VCFxCopTool"
|
163
|
+
/>
|
164
|
+
<Tool
|
165
|
+
Name="VCAppVerifierTool"
|
166
|
+
/>
|
167
|
+
<Tool
|
168
|
+
Name="VCPostBuildEventTool"
|
169
|
+
/>
|
170
|
+
</Configuration>
|
171
|
+
</Configurations>
|
172
|
+
<References>
|
173
|
+
</References>
|
174
|
+
<Files>
|
175
|
+
<Filter
|
176
|
+
Name="Source Files"
|
177
|
+
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
178
|
+
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
179
|
+
>
|
180
|
+
<File
|
181
|
+
RelativePath="..\..\compat.c"
|
182
|
+
>
|
183
|
+
</File>
|
184
|
+
<File
|
185
|
+
RelativePath="..\..\pg.c"
|
186
|
+
>
|
187
|
+
</File>
|
188
|
+
</Filter>
|
189
|
+
<Filter
|
190
|
+
Name="Header Files"
|
191
|
+
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
192
|
+
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
193
|
+
>
|
194
|
+
<File
|
195
|
+
RelativePath="..\..\compat.h"
|
196
|
+
>
|
197
|
+
</File>
|
198
|
+
<File
|
199
|
+
RelativePath="..\..\pg.h"
|
200
|
+
>
|
201
|
+
</File>
|
202
|
+
</Filter>
|
203
|
+
<Filter
|
204
|
+
Name="Resource Files"
|
205
|
+
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
206
|
+
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
207
|
+
>
|
208
|
+
</Filter>
|
209
|
+
<File
|
210
|
+
RelativePath=".\ReadMe.txt"
|
211
|
+
>
|
212
|
+
</File>
|
213
|
+
</Files>
|
214
|
+
<Globals>
|
215
|
+
</Globals>
|
216
|
+
</VisualStudioProject>
|