search for: pgerror

Displaying 20 results from an estimated 75 matches for "pgerror".

Did you mean: perror
2010 Jan 19
1
PGError: ERROR: operator does not exist: character = integer
Hi, I''m using PostgreSql database with the rails application,In a functionality I''m trying to compare two attributes in a condition, one is of type varchar and other the Integer. While doing so i''m getting the error as below. ActiveRecord::StatementInvalid: PGError: ERROR: operator does not exist: character = integer LINE 5: WHERE PART.part_number = UNIT.part_number::INT ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. I can''t change the d...
2010 Apr 14
3
PGError: duplicate key
I''m running a rails 2.3.5 / ruby 1.8.7 / postgresql 8.4.2 app and have just run into a curious problem. I have several tables that are initialized with data from csv files and I''ve noticed that, when I try to add new data to any of these tables via Table.new I get a PGError on duplicate key. For example: MIGRATION: class CreateNumbers < ActiveRecord::Migration def self.up create_table :numbers do |t| t.string :name t.integer :value t.timestamps end csv_file = "#{Rails.root}/db/migrate/numbers.csv" fields = ''...
2007 Mar 19
0
PGError "unknown column" on polymorphic association column
Hi all ! This is very strange. I am attempting to get my application running on PostgreSQL (from MySQL), and I get this error: ActiveRecord::StatementInvalid: PGError: ERREUR: la colonne «Party» n'existe pas : SELECT * FROM contact_routes WHERE (routable_type = "Party" AND routable_id = 1000013) ORDER BY position DESC LIMIT 1 /home/francois/src/xlsuite.org/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:128...
2010 Dec 12
1
PGError: ERROR: invalid byte sequence for encoding "UTF8": 0xa0
Hello, my app is reading emails with attachments and inserting the Email message into the database to be sent to delayed job for processing. When inserting an email with attachments into the database, I get the following error: PGError: ERROR: invalid byte sequence for encoding "UTF8": 0xa0 Has anyone seen this before? There doesn''t seem to be much rails related via googling. Right now I''m saving the email with attachments to a text column, has anyone tried using a blob to resolve? Thanks -- You...
2011 Feb 17
4
PGError: ERROR: relation "instructions" does not exist
...ation "instructions" does not exist". Totally, I got same error for 64 tests as 64 errors. I am using rails 3.0, Ruby 1.9.2, Netbeans 6.8. PS: I didnt creat Instruction manual for rails application. *Error: test_should_get_index(HomeControllerTest): ActiveRecord::StatementInvalid: PGError: ERROR: relation "instructions" does not exist LINE 1: DELETE FROM "instructions" ^ : DELETE FROM "instructions"* Kindly help me in this regard -- K. Palani Kannan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: T...
2006 Apr 03
2
problems testing on 1.1 and postgresql
Hi, I get errors doing this: 1) createdb myapp_test 2) rake db:test:clone_structure 3) rake test:units rake aborted! PGError: ERROR: relation "matches" already exists I''m using the :sql schema format because there are some problems with postgres and the :ruby schema format config.active_record.schema_format = :sql It seems rake test:units is trying to create the tables again, is this a bug? Je...
2006 Jun 15
8
postgresql sequence and migrations
...se in the migration, I might as well reset the sequence there too. so I tried this in my migration file... execute ''SELECT setval ( "roles_id_seq", 0 );'' and it crashed with... -- execute("SELECT setval ( \"roles_id_seq\", 0 );") rake aborted! PGError: ERROR: column "roles_id_seq" does not exist : SELECT setval ( "roles_id_seq", 0 ); How do I accomplish this inside of a migration? Craig
2006 May 28
1
ActiveRecord: FK constraints problem
...9;Content'', :foreign_key => ''default_content_id'', :dependent => :nullify end class Content < ActiveRecord::Base belongs_to :section end When I trying to remove some Content which associated with Section I have an error related to foreigh key violation: "PGError: ERROR: update or delete on "contents" violates foreign key constraint "fk_contents_contents_sections" on "contents_sections" DETAIL: Key (id)=(7) is still referenced from table "contents_sections". : DELETE FROM contents WHERE id =...
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
..../test/../lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:90:in `run'' Name: test_create_associate_when_adding_to_has_many_through(AssociationsJoinModelTest) Type: Failure Message: Exception raised: Class: <ActiveRecord::StatementInvalid> Message: <"PGError: ERROR: column \"taggings_count\" does not exist\n: UPDATE \"posts\" SET \"taggings_count\" = \"taggings_count\" + 1 WHERE (\"id\" = 2) AND ( (\"posts\".\"type\" = ''SpecialPost'' ) ) "> ---Backtrace--- ....
2006 Jan 09
3
Include with two references of one model of the same table
...not sure what to make of it yet, but I think it might be incorrect behavior. When doing a @inst.find(:all, :include => ["hometeam", "awayteam"] ...) hometeam and awayteam are two references from a belongs_to that is of the same model and of the same table. I will get a pgerror stating that "matches", which is the table that these fk''s loop back to is being ambiguously referenced. The SQL spit out showed only one select on "matches" where I think should be two selects on two aliases of "matches". Heres some code below to better...
2006 Feb 28
5
Problem with paginate, include and foreign keys
...de => ''start_date'', :conditions => [condition, first,last] ) However, in schedules_controller.rb, this fails: @schedule_pages, @schedules = paginate( :schedules, :include => [''start_date''], :conditions => [condition, first, last] ) PGError: ERROR: column "start_date" does not exist : SELECT COUNT(*) FROM schedules WHERE (date_trunc(''day'', start_date) between date(''2006-2-01'') and date(''2006-3-01 - 1'') - 1) What am I doing wrong here? Thanks, Dan
2011 Aug 24
9
PGError: server closed the connection unexpectedly
Hi, Since 1-2 weeks I get a lot of "PGError: server closed the connection unexpectedly" errors and I cant figure out where it is coming from. Haven''t found any solution on Google either. My setup is: Postgres Rails 2.3.9 Passenger Ruby 1.9.2 Thought it might be passenger, so I stopped the spawning, it seems to have helped a b...
2006 Oct 25
3
rails app breaks after pg restart
Hi, Disclaimer: I''m pretty sure this isn''t a mongrel issue, as I''m pretty sure I had the same problem back in the lighty-fastcgi days.. After a postgres restart, my rails apps crash with this error: ActiveRecord::StatementInvalid (PGError: FATAL: terminating connection due to a dministrator command server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. : SELECT count(*) AS count_all FROM matches ): Strange thing is, after a do a page...
2010 Nov 18
2
Testing Error: ActiveRecord::StatementInvalid
I intentionally deleted the attribute author from the table comments. When I used functional testing, I got the following message ActiveRecord::StatementInvalid: PGError: ERROR: column "author" of relation "comments" does not exist What should I need to do in order to avoid this error message!!! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email...
2011 Sep 18
9
Rails 3 and postgresql
...:regclass) nombre | character varying(40) | path | character varying(250) | in a method I have : id = params[:album].to_i @album = Pack.find id That is the sentence located using debugger. The answer in the browser: ActiveRecord::StatementInvalid in FotosController#inic PGError: ERROR: zero-length delimited identifier at or near """" LINE 1: SELECT "packs".* FROM "packs" WHERE "packs"."" = $1 LIMIT ... ^ : SELECT "packs".* FROM "packs"...
2006 Apr 18
6
Postgresql and ActiveRecords problems
Hi all. I have a problem with postgresql PK columns and ActiveRecord. The error is: PGError: ERROR: null value in column "item_id" violates not-null. Ok, it''s wrong to insert NULL into PK columns, but rails doing it. How to fix? So sad..
2008 Sep 23
3
Association error using find since upgrading to Rails 2.1.1
...base, :username => ''postgres'' ) class Schedule < ActiveRecord::Base belongs_to :user end class User < ActiveRecord::Base has_many :schedules end # This works with AR 2.1.1 s = Schedule.find(:first) p s.user_id p s.user.cuid # This does not with AR 2.1.1 => PGError: ERROR: column "cuid" does not exist s = Schedule.find( :first, :include => [:user], :conditions => ["cuid = ?", "foo"] # Also tried user.cuid ) What obvious bit am I missing? Thanks, Dan --~--~---------~--~----~------------~-------~--~----~ You r...
2006 Feb 03
2
acts_as_tree counter_cache behavior is different than API docs
...=> "good grief.") This follows the the API docs pretty closely at http://ar.rubyonrails.com/classes/ActiveRecord/Acts/Tree/ClassMethods.html However, the test fails for this reason: 4) Error: test_proper_creation_of_message_reply(ForumMessageTest): ActiveRecord::StatementInvalid: PGError: ERROR: column "forum_messages_count" does not exist : UPDATE forum_message SET forum_messages_count = forum_messages_count + 1 WHERE (id = 1) The docs do not mention creating a table column based on the model name. Is this the now intended behavior? Where is it documented and can the...
2009 Feb 22
2
Strange AR error ( column does not exist)
I''m trying to deploy a Rails app on a platform using Thin, after some horrible sessions trying to make it work with fcgi. All is going well, but my Application controller throws this error: ActiveRecord::StatementInvalid (PGError: ERROR: column "firstpeer" does not exist LINE 1: SELECT * FROM "switches" WHERE (firstPeer = 15 OR secondPeer... ^ : SELECT * FROM "switches" WHERE (firstPeer = 15 OR secondPeer = 15) ): AR is complaining that there is no colu...
2006 Mar 17
3
Timestamps casted to nil?
...; nil Using before_type_cast, I can see the content is still there, albeit as string: >> puts me.valid_from_before_type_cast 01.03.1999 14:09:21 CET => nil Saving a modified object sets all timestamps to nil: >> me.valid=0 => 0 >> me.save ActiveRecord::StatementInvalid: PGError: ERROR: null value in column "valid_from" violates not-null constraint : UPDATE users SET "email" = ''jan.foeh@parship.de'', "mtime" = NULL, "lastlogin" = NULL, "valid_from" = NULL, "valid" = 0, "password" = &...