changeset 11709:4f95e5c4a57a octave-forge

Don't restrict bytea representation to be one-dimensional anymore.
author i7tiol
date Sat, 18 May 2013 10:30:40 +0000
parents efca9c2a8a7e
children 4f5471a9bce6
files main/database/DESCRIPTION main/database/inst/pq_exec_params.m main/database/src/converters.cc
diffstat 3 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/main/database/DESCRIPTION	Sat May 18 10:22:06 2013 +0000
+++ b/main/database/DESCRIPTION	Sat May 18 10:30:40 2013 +0000
@@ -1,6 +1,6 @@
 Name: database
 Version: 2.1.1
-Date: 2013-05-17
+Date: 2013-05-18
 Author: Olaf Till <i7tiol@t-online.de>
 Maintainer: Olaf Till <i7tiol@t-online.de>
 Title: Database.
--- a/main/database/inst/pq_exec_params.m	Sat May 18 10:22:06 2013 +0000
+++ b/main/database/inst/pq_exec_params.m	Sat May 18 10:30:40 2013 +0000
@@ -115,7 +115,7 @@
 ## @tab string of length < @code{NAMEDATALEN} (often 64)
 ## @tab yes
 ## @item bytea
-## @tab one-dimensional array of uint8
+## @tab array of uint8, one-dimensional if converted from postgresql data
 ## @tab no
 ## @item int2
 ## @tab int16 scalar
--- a/main/database/src/converters.cc	Sat May 18 10:22:06 2013 +0000
+++ b/main/database/src/converters.cc	Sat May 18 10:30:40 2013 +0000
@@ -348,13 +348,6 @@
 {
   uint8NDArray b = ov.uint8_array_value ();
 
-  if (! error_state)
-    {
-      dim_vector dv = b.dims ();
-      if (dv.length () > 2 || (dv(0) > 1 && dv(1) > 1))
-        error ("bytea representation must be one-dimensional");
-    }
-
   if (error_state)
     {
       error ("can not convert octave_value to bytea representation");