more info: when setting some defaults (the same ones that pg_dump
shows when dumping a schema), I get *almost* what I want:

Your database is stored in DB...
irb(main):001:0> DB << "SET search_path = public, pg_catalog;"
=> 0
irb(main):002:0> DB << "SET default_tablespace = '';"
=> 0
irb(main):003:0> DB << "SET default_with_oids = false;"
=> 0
irb(main):004:0> class Domain1 < Sequel::Model(:domains); end
=> nil
irb(main):005:0> Domain1.columns
=>
[:domain_catalog, :id, :domain_schema, :name, :domain_name, :master, 
:data_type, :last_check, :character_maximum_length, :type, 
:character_octet_length, :notified_serial, :character_set_catalog, :account, 
:character_set_schema, :character_set_name, :collation_catalog, 
:collation_schema, :collation_name, :numeric_precision, 
:numeric_precision_radix, :numeric_scale, :datetime_precision, :interval_type, 
:interval_precision, :domain_default, :udt_catalog, :udt_schema, :udt_name, 
:scope_catalog, :scope_schema, :scope_name, :maximum_cardinality, 
:dtd_identifier]

Here, I get the columns from my table:
[:id, :name, :master, :last_check, :type, :notified_serial, :account],
but I also get all the other garbage columns from the postgres'
domains relation... :-(

On Oct 21, 8:43 am, rolando <[EMAIL PROTECTED]> wrote:
> I'm trying to set a simple model, but apparently the table name is
> conflicting with an internal one in postgres:
>
> class Domain < Sequel::Model(:domains); end
>
> when asking for the Domain.columns I get this:
>
> [:domain_catalog, :domain_schema, :domain_name, :data_type, 
> :character_maximum_length, :character_octet_length, :character_set_catalog, 
> :character_set_schema, :character_set_name, :collation_catalog, 
> :collation_schema, :collation_name, :numeric_precision, 
> :numeric_precision_radix, :numeric_scale, :datetime_precision, 
> :interval_type, :interval_precision, :domain_default, :udt_catalog, 
> :udt_schema, :udt_name, :scope_catalog, :scope_schema, :scope_name, 
> :maximum_cardinality, :dtd_identifier]
>
> which is clearly not what I want :-)
> is there any way to set the namespace for the tables?
> thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-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/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to