Re: [GENERAL] how to search for relation by name?

2009-04-23 Thread Tom Lane
zach cruise writes: > Thanks! I just created new database using old database as template, > and everything got copied over without errors. is that recommended > over pg_dump though when just recreating database for different > encoding? It's pretty much guaranteed not to work, since the data will

Re: [GENERAL] how to search for relation by name?

2009-04-23 Thread zach cruise
Thanks! I just created new database using old database as template, and everything got copied over without errors. is that recommended over pg_dump though when just recreating database for different encoding? http://www.postgresql.org/docs/8.1/interactive/manage-ag-templatedbs.html On Wed, Apr 22

Re: [GENERAL] how to search for relation by name?

2009-04-22 Thread DM
Here is the sql SELECT c.oid, n.nspname, c.relname FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relname LIKE ('%dt%') AND pg_catalog.pg_table_is_visible(c.oid) replace dt with your sequence name pg_catalog has the information. Thank

[GENERAL] how to search for relation by name?

2009-04-22 Thread zach cruise
when i try to copy database (into another database), i get "relation does not exist" errors for 'super objects' like sequences. (that is fine since i am using pg_dump, not pg_dumpall) but there is one relation i can't find to recreate in the new database. how can i search database for relation by