1. 15 10月, 2005 1 次提交
  2. 13 10月, 2005 1 次提交
  3. 04 10月, 2005 1 次提交
  4. 25 9月, 2005 1 次提交
  5. 14 9月, 2005 2 次提交
  6. 25 8月, 2005 3 次提交
  7. 21 8月, 2005 1 次提交
  8. 13 8月, 2005 5 次提交
  9. 28 7月, 2005 2 次提交
  10. 24 7月, 2005 1 次提交
  11. 14 7月, 2005 1 次提交
  12. 13 7月, 2005 1 次提交
  13. 12 7月, 2005 1 次提交
  14. 11 7月, 2005 1 次提交
  15. 10 7月, 2005 3 次提交
    • B
      Following up a previous thought I had, yesterday I realised how to · b135508c
      Bruce Momjian 提交于
      return arays nicely without having to make the plperl programmer aware
      of anything. The attached patch allows plperl to return an arrayref
      where the function returns an array type. It silently calls a perl
      function to stringify the array before passing it to the pg array
      parser. Non-array returns are handled as before (i.e. passed through
      this process) so it is backwards compatible. I will presently submit
      regression tests and docs.
      
      example:
      
      andrew=# create or replace function blah() returns text[][] language
      plperl as $$ return [['a"b','c,d'],['e\\f','g']]; $$;
      CREATE FUNCTION
      andrew=# select blah();
                  blah
      -----------------------------
       {{"a\"b","c,d"},{"e\\f",g}}
      
      
      This would complete half of the TODO item:
      
        . Pass arrays natively instead of as text between plperl and postgres
      
      (The other half is translating pg array arguments to perl arrays - that
      will have to wait for 8.1).
      
      Some of this patch is adapted from a previously submitted patch from
      Sergej Sergeev. Both he and Abhijit Menon-Sen have looked it over
      briefly and tentatively said it looks ok.
      
      Andrew Dunstan
      b135508c
    • B
      The attached patch implements spi_query() and spi_fetchrow() functions · 6d92f210
      Bruce Momjian 提交于
      for PL/Perl, to avoid loading the entire result set into memory as the
      existing spi_exec_query() function does.
      
      Here's how one might use the new functions:
      
          $x = spi_query("select ...");
          while (defined ($y = spi_fetchrow($x))) {
              ...
              return_next(...);
          }
      
      The changes do not affect the spi_exec_query() interface in any way.
      
      Abhijit Menon-Sen
      6d92f210
    • B
      This patch addresses the problem mentioned in the "process crash · 37f11c30
      Bruce Momjian 提交于
      when a plpython function returns unicode" thread:
      
      http://archives.postgresql.org/pgsql-bugs/2005-06/msg00105.php
      
      In several places PL/Python was calling PyObject_Str() and then
      PyString_AsString() without checking if the former had returned
      NULL to indicate an error.  PyString_AsString() doesn't expect a
      NULL argument, so passing one causes a segmentation fault.  This
      patch adds checks for NULL and raises errors via PLy_elog(), which
      prints details of the underlying Python exception.  The patch also
      adds regression tests for these checks.  All tests pass on my
      Solaris 9 box running HEAD and Python 2.4.1.
      
      In one place the patch doesn't call PLy_elog() because that could
      cause infinite recursion; see the comment I added.  I'm not sure
      how to test that particular case or whether it's even possible to
      get an error there: the value that the code should check is the
      Python exception type, so I wonder if a NULL value "shouldn't
      happen."  This patch converts NULL to "Unknown Exception" but I
      wonder if an Assert() would be appropriate.
      
      The patch is against HEAD but the same changes should be applied
      to earlier versions because they have the same problem.  The patch
      might not apply cleanly against earlier versions -- will the committer
      take care of little differences or should I submit different versions
      of the patch?
      
      Michael Fuhr
      37f11c30
  16. 07 7月, 2005 4 次提交
  17. 06 7月, 2005 1 次提交
    • B
      Back out patch. This should be done like other server-side languages. · 2d6c375c
      Bruce Momjian 提交于
      ---------------------------------------------------------------------------
      
      This patch allows the PL/Python module to do (SRF) functions.
      
      The patch was taken from the CVS version.
      
      I have modified the plpython.c file and have added a test sql script for
      testing the functionality. It was actually the script that was in the
      8.0.3 version but have since been removed.
      
      In order to signal the end of a set, the called python function must
      simply return plpy.EndOfSet and the set would be returned.
      
      Gerrit van Dyk
      2d6c375c
  18. 05 7月, 2005 1 次提交
    • B
      This patch allows the PL/Python module to do (SRF) functions. · af875671
      Bruce Momjian 提交于
      The patch was taken from the CVS version.
      
      I have modified the plpython.c file and have added a test sql script for
      testing the functionality. It was actually the script that was in the
      8.0.3 version but have since been removed.
      
      In order to signal the end of a set, the called python function must
      simply return plpy.EndOfSet and the set would be returned.
      
      Gerrit van Dyk
      af875671
  19. 04 7月, 2005 1 次提交
  20. 03 7月, 2005 1 次提交
  21. 02 7月, 2005 2 次提交
  22. 27 6月, 2005 2 次提交
  23. 23 6月, 2005 1 次提交
  24. 22 6月, 2005 2 次提交