jeremyevans-postgres-pr 0.6.1 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,6 +43,18 @@ class PGconn
43
43
  str.gsub("'","''").gsub("\\", "\\\\\\\\")
44
44
  end
45
45
 
46
+ def notice_processor
47
+ @conn.notice_processor
48
+ end
49
+
50
+ def notice_processor=(np)
51
+ @conn.notice_processor = np
52
+ end
53
+
54
+ def self.quote_ident(name)
55
+ %("#{name}")
56
+ end
57
+
46
58
  end
47
59
 
48
60
  class PGresult
@@ -1,20 +1,17 @@
1
1
  module Postgres::Conversion
2
-
3
- #
4
2
  # Encodes a string as bytea value.
5
3
  #
6
- # for encoding rules see:
4
+ # For encoding rules see:
7
5
  # http://www.postgresql.org/docs/7.4/static/datatype-binary.html
8
6
  #
9
-
10
7
  def encode_bytea(str)
11
- str.gsub(/[\000-\037\047\134\177-\377]/) {|b| "\\#{ b[0].to_s(8).rjust(3, '0') }" }
8
+ # each_byte used instead of [] for 1.9 compatibility
9
+ str.gsub(/[\000-\037\047\134\177-\377]/){|b| "\\#{sprintf('%o', b.each_byte{|x| break x}).rjust(3, '0')}"}
12
10
  end
13
11
 
14
- #
15
12
  # Decodes a bytea encoded string.
16
13
  #
17
- # for decoding rules see:
14
+ # For decoding rules see:
18
15
  # http://www.postgresql.org/docs/7.4/static/datatype-binary.html
19
16
  #
20
17
  def decode_bytea(str)
@@ -22,5 +19,4 @@ module Postgres::Conversion
22
19
  if s.size == 2 then s[1,1] else s[1,3].oct.chr end
23
20
  }
24
21
  end
25
-
26
22
  end
@@ -1,3 +1,3 @@
1
1
  module PostgresPR
2
- Version = "0.6.1"
2
+ Version = "0.6.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jeremyevans-postgres-pr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ hash: 1
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 6
9
+ - 3
10
+ version: 0.6.3
5
11
  platform: ruby
6
12
  authors:
7
13
  - Jeremy Evans
@@ -9,7 +15,7 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2009-10-11 00:00:00 -07:00
18
+ date: 2010-06-15 00:00:00 -07:00
13
19
  default_executable:
14
20
  dependencies: []
15
21
 
@@ -22,22 +28,22 @@ extensions: []
22
28
  extra_rdoc_files: []
23
29
 
24
30
  files:
25
- - lib/binary_reader.rb
26
- - lib/binary_writer.rb
27
- - lib/buffer.rb
28
- - lib/byteorder.rb
29
- - lib/postgres-pr/connection.rb
30
- - lib/postgres-pr/message.rb
31
- - lib/postgres-pr/postgres-compat.rb
32
31
  - lib/postgres-pr/typeconv/TC_conv.rb
33
32
  - lib/postgres-pr/typeconv/array.rb
34
33
  - lib/postgres-pr/typeconv/bytea.rb
35
34
  - lib/postgres-pr/typeconv/conv.rb
35
+ - lib/postgres-pr/connection.rb
36
+ - lib/postgres-pr/message.rb
37
+ - lib/postgres-pr/postgres-compat.rb
36
38
  - lib/postgres-pr/version.rb
39
+ - lib/binary_reader.rb
40
+ - lib/binary_writer.rb
41
+ - lib/buffer.rb
42
+ - lib/byteorder.rb
37
43
  - lib/postgres.rb
38
44
  - test/TC_message.rb
39
- - examples/client.rb
40
45
  - examples/og/test.rb
46
+ - examples/client.rb
41
47
  - examples/server.rb
42
48
  - examples/test_connection.rb
43
49
  has_rdoc: true
@@ -50,21 +56,27 @@ rdoc_options: []
50
56
  require_paths:
51
57
  - lib
52
58
  required_ruby_version: !ruby/object:Gem::Requirement
59
+ none: false
53
60
  requirements:
54
61
  - - ">="
55
62
  - !ruby/object:Gem::Version
63
+ hash: 3
64
+ segments:
65
+ - 0
56
66
  version: "0"
57
- version:
58
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
+ none: false
59
69
  requirements:
60
70
  - - ">="
61
71
  - !ruby/object:Gem::Version
72
+ hash: 3
73
+ segments:
74
+ - 0
62
75
  version: "0"
63
- version:
64
76
  requirements:
65
77
  - PostgreSQL >= 7.4
66
78
  rubyforge_project:
67
- rubygems_version: 1.3.5
79
+ rubygems_version: 1.3.7
68
80
  signing_key:
69
81
  specification_version: 3
70
82
  summary: A pure Ruby interface to the PostgreSQL (>= 7.4) database