On Apr 21, 10:19 pm, Fearless Fool <[email protected]> wrote:
> Rob Biedenharn wrote:
>
> > Can you do it in two steps?
> > ...
> > You could also split your single sql on a '$$' boundary and iterate
> > over each fragment.
>
> > -Rob
>
> Hi Rob: Sure - I could feed a line at a time for that matter.  But
> consider me curious: what's the rationale behind splitting it?  (I admit
> I'm a little nervous about a function that leaves the intermediate state
> of the SQL interpreter with delimiters set to $$ -- I suspect everything
> would stop working if that was interrupted before resetting the
> delimiters...)

That sort of state is done on a per connection basis.
Secondly my understanding is that the point of changing the delimiter
to $$ is because you don't want a ; in your function to be interpreted
as the end of your create function statement. However if multiple
statement handling isn't turned on, do you need to change the
delimiter at all ?  (you would need to separate the drop and the
create since those are two separate statements)

Fred
>
> - ff
> --
> Posted viahttp://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to