kputnam / piggly

PL/pgSQL stored procedure code coverage tool
Other
69 stars 14 forks source link

Issue with strictness and security with tracing procedure #11

Closed lcoldiron closed 13 years ago

lcoldiron commented 13 years ago

lib/piggly/dumper/prodcedure.rb around line 50 needs to be modified to work with strictness and security keywords.

before:

Returns source SQL function definition statement

  # @return [String]
  def definition(body)
    [%[create or replace function "#{@namespace}"."#{@name}" (#{arguments})],
     %[ #{strictness} #{security} returns #{type} as $**PIGGLY**$],
     body,
     %[$**PIGGLY**$ language plpgsql #{@volatility}]].join("\n")
  end

after:

Returns source SQL function definition statement

  # @return [String]
  def definition(body)
    [%[create or replace function "#{@namespace}"."#{@name}" (#{arguments})],
     %[ returns #{type} as $**PIGGLY**$],
     body,
     %[$**PIGGLY**$ language plpgsql #{strictness} #{security} #{@volatility}]].join("\n")
  end
kputnam commented 13 years ago

Luke, this looks good. Beware you will need to do git pull upstream before working on this because I've made several changes to support schema-qualified types. Make sure to run rake spec before committing and submit a pull request. Thank you!