Postgres problem with import
-
Gary Blessington
See here: http://www.continuousthinking.co...
That will get the ("nextval('sequence')") running. However, postgres imports are still executing individual sql inserts when using import.
-
Zach Dennis
I haven't touched postgres in a very long time. The import functionality for postgresql was never optimized (it was very fast anyways). If this is something you can aide with I'd be happy to work with you on it. Let me know since the 0.8.x codebase is being rewritten for a 0.9 release (which will act as the RC for 1.0)
-
Jens
- Tag changed from csv, import, postgres, rails2.1.0 to import, postgres
Hi,
please implement postgresql batch imports. I had it working using 0.8.2 by adding something like "def supports_import?; true; end" in the adapter file, but this doesn't work with 0.9.2 any more.
Postgres import is vital for working with ar-extensions for us.
And it does work fine, one just needs to tell the plugin that it can be used.Thanks!
-
Jens
Hi,
please implement postgresql batch imports. I had it working using 0.8.2 by adding something like "def supports_import?; true; end" in the adapter file, but this doesn't work with 0.9.2 any more.
Postgres import is vital for working with ar-extensions for us.
And it does work fine, one just needs to tell the plugin that it can be used.Thanks!
-
Jens
- Tag changed from import, postgres to import, patch, postgres
Hi,
I monkey patched import support for Postgres into ar-extensions.
Works fine so far (Postgres-8.3 from MacPorts), at least using #import_without_validations_or_callbacks (which is the only function I need so far).Here's a patch:
--- a/vendor/gems/ar-extensions-0.9.2/lib/ar-extensions/adapters/postgresql.rb +++ b/vendor/gems/ar-extensions-0.9.2/lib/ar-extensions/adapters/postgresql.rb @@ -4,6 +4,9 @@ module ActiveRecord # :nodoc:
def next_value_for_sequence(sequence_name) %{nextval('#{sequence_name}')} end- def supports_import?
-
true - end end end end
Same thing like in 0.8.2, also worked fine there. Please accept this patch into the main tree.
Thanks!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.