Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG::SyntaxError: ERROR: zero-length delimited identifier at or near #71

Open
edgarv09 opened this issue Jan 24, 2019 · 3 comments
Open

Comments

@edgarv09
Copy link

edgarv09 commented Jan 24, 2019

Trying to use this gem in postgres with postgis extension am getting this error. using BlackList

PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"
LINE 1: ... "users" SET "name" = $1, "email" = $2 WHERE "users"."" = $3
                                                                ^
: UPDATE "users" SET "name" = $1, "email" = $2 WHERE "users"."" = $3 (ActiveRecord::StatementInvalid)

the same for another table

 ERROR -- : PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"
LINE 1: ...T "name" = $1, "phone" = $2 WHERE "basic_quotations"."" = $3
                                                                ^
: UPDATE "basic_quotations" SET "name" = $1, "phone" = $2 WHERE "basic_quotations"."" = $3 (ActiveRecord::StatementInvalid)
E, [2019-01-24T16:21:34.655710 #27117] ERROR -- : /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `async_exec_params'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `block (2 levels) in exec_no_cache'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.2/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:610:in `block in exec_no_cache'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:579:in `block (2 levels) in log'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:578:in `block in log'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.2/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:569:in `log'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:609:in `exec_no_cache'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `execute_and_clear'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:94:in `exec_delete'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:162:in `update'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:21:in `update'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/composite_primary_keys-11.1.0/lib/composite_primary_keys/persistence.rb:38:in `_update_record'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/persistence.rb:479:in `update_columns'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/blacklist.rb:15:in `process_record'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/base.rb:191:in `process_record_if'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/base.rb:120:in `block in process_table'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/base.rb:117:in `process_table'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/base.rb:101:in `process'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/database.rb:68:in `block in anonymize'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/database.rb:66:in `each'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/database.rb:66:in `anonymize'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/database.rb:46:in `anonymize'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/dsl.rb:10:in `database'
  rdbms_whitelist_generated.rb:7:in `<main>'
E, [2019-01-24T16:21:34.656483 #27117] ERROR -- : PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"
LINE 1: ... "users" SET "name" = $1, "email" = $2 WHERE "users"."" = $3
                                                                ^
: UPDATE "users" SET "name" = $1, "email" = $2 WHERE "users"."" = $3 (ActiveRecord::StatementInvalid)
@sunitparekh
Copy link
Owner

sunitparekh commented Jan 25, 2019 via email

@edgarv09
Copy link
Author

Yeahh!!, sure.

rdbms_whitelist_generated.rb.txt

@sunitparekh
Copy link
Owner

sunitparekh commented Jan 28, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants