search for: pg_class

Displaying 6 results from an estimated 6 matches for "pg_class".

Did you mean: g_class
2006 Jul 20
4
Help with Rails and postgres with sequence numbers (global?)
...= d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = ''partsgroup''::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum [4;35;1mSQL (0.016000) BEGIN [4;36;1mPK and serial sequence (0.031000) [0;1m SELECT attr.attname, name.nspname, seq.relname FROM pg_class seq, pg_attribute attr, pg_depend dep, pg_namespace name, pg_constraint cons WHERE seq.oid = dep.objid AND seq.relnamespace = name.oid AND seq.relkind = ''S'' AND attr.attrelid = dep.refobjid AND attr.attnum = dep.refobjsubid AND attr.attrelid = cons.conrelid AND attr.att...
2008 Mar 08
9
Validation error handling on related models
I have 2 models, entity and client. Entity has_one client and client belongs_to entity. Entity has attributes name and legal_name. Entity also has an unique index on (lower(name)). The pKey for both is the conventional Rails id. Client has a fKey constraint on entity_id and is indexed in entity_id. In controllers/clients_controller.rb I have: # GET /clients/new # GET /clients/new.xml
2006 Mar 16
3
inserted_at seems buggy in production mode?
...id"=>"159", "controller"=>"match"} Match Load (0.001001) SELECT * FROM matches WHERE (matches.id = ''159'') LIMIT 1 SQL (0.000319) BEGIN PK and serial sequence (0.017476) SELECT attr.attname, name.nspname, seq.relname FROM pg_class seq, pg_attribute attr, pg_depend dep, pg_namespace name, pg_constraint cons WHERE seq.oid = dep.objid AND seq.relnamespace = name.oid AND seq.relkind = ''S'' AND attr.attrelid = dep.refobjid AND attr.attnum = dep.refobjsubid AND attr.attrelid = cons.conrelid A...
2005 May 01
2
Active Record and Postgres table inheritance?
...re? I am new to Ruby and Rails, but it doesn''t seem like it would be to difficult to adapt the current Active Record table inheritance model to work right with PostgreSQL. The hidden tableoid column is basicly equivalent to the Active Record type column, but it must be joined with the pg_class table to get an actual table/class name. -- Quinn Harris quinn-1F3SigAhSoJeoWH0uzbU5w@public.gmane.org
2005 Nov 07
0
pk_and_sequence_for(table) bug?
...>> Player.connection.pk_and_sequence_for "players" => nil >> Here''s what RoR sends to the postgresql server with this last method call LOG: statement: SELECT attr.attname, (name.nspname || ''.'' || seq.relname) FROM pg_class seq, pg_attribute attr, pg_depend dep, pg_namespace name, pg_constraint cons WHERE seq.oid = dep.objid AND seq.relnamespace = name.oid...
2006 May 18
5
Overriding default DELETE behavior with logical deletes
Hello! I am trying to figure out how to implement *logical deletes* instead of physical deletes using ActiveRecord. Basically, in many applications that deal with E-Commerce, you really can''t physically delete almost anything, because records must be kept for auditing and customer service tracking purposes. In the past, I''ve implemented logical deletes as follows: 1.