Re: [GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-20 Thread Huang, Suya
Hi John, We stored ISO-8859-1, do we still need to use iconv to convert the file? Thanks, Suya -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of John R Pierce Sent: Friday, October 18, 2013 5:12 PM To:

Re: [GENERAL] Preserving the source code of views

2013-10-20 Thread Bill Moran
On Sat, 19 Oct 2013 22:38:28 -0500 Brian Crowell br...@fluggo.com wrote: Hello! I'm evaluating PostgreSQL as a replacement for SQL Server in our in-house systems. I've been really impressed with it so far, and I'm eager to try it with our data sets. I've run across one thing that would make

Re: [GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-20 Thread John R Pierce
On 10/20/2013 3:56 AM, Huang, Suya wrote: We stored ISO-8859-1, do we still need to use iconv to convert the file? you should be able to do the dump specifying pg_dump --encoding=iso-8559-1 then restore it to the utf8 database, and postgres will do the conversion for you. -- john r

Re: [GENERAL] Preserving the source code of views

2013-10-20 Thread Tom Lane
Brian Crowell br...@fluggo.com writes: I've run across one thing that would make a transfer difficult. Postgres doesn't preserve the source code for views, as far as I can tell. It parses them and then prints them its own way. We have a lot of complicated views, where both the formatting and

Re: [GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-20 Thread Huang, Suya
We stored ISO-8859-1, do we still need to use iconv to convert the file? you should be able to do the dump specifying pg_dump --encoding=iso-8559-1 then restore it to the utf8 database, and postgres will do the conversion for you. One more question, if the data stored in database including

Re: [GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-20 Thread John R Pierce
On 10/20/2013 4:10 PM, Huang, Suya wrote: uestion, if the data stored in database including UTF-8 and ISO 8859-1, is that OK to dump them all in ISO-8859-1? absolutely not. UTF8 is not valid ISO88591, and if interpreted as such will result in garbage characters. if you have mixed

Re: [GENERAL] Preserving the source code of views

2013-10-20 Thread Brian Crowell
On Sun, Oct 20, 2013 at 4:24 PM, Tom Lane t...@sss.pgh.pa.us wrote: No, and it's very unlikely that there ever will be, because it's completely against the system structure at a number of levels. However, there's more than one way to skin this cat. Many people keep their DDL as text in some

Re: [GENERAL] Preserving the source code of views

2013-10-20 Thread Brian Crowell
On Sun, Oct 20, 2013 at 7:01 AM, Bill Moran wmo...@potentialtech.com wrote: You could adjust your workflow to use something like dbsteward: http://dbsteward.org/ Nifty, but without an editor, I don't think I could convince our developers to author the databases in XML. --Brian -- Sent via

Re: [GENERAL] Preserving the source code of views

2013-10-20 Thread Brian Crowell
On Sat, Oct 19, 2013 at 11:37 PM, Pavel Stehule pavel.steh...@gmail.com wrote: For my work is very significant @a point - I wrote and I am writing usually database centric stored procedures centric applications and @a works perfect. For me a SQL code is code as any other - I use a my favourite

Re: [GENERAL] Preserving the source code of views

2013-10-20 Thread Pavel Stehule
2013/10/21 Brian Crowell br...@fluggo.com On Sat, Oct 19, 2013 at 11:37 PM, Pavel Stehule pavel.steh...@gmail.com wrote: For my work is very significant @a point - I wrote and I am writing usually database centric stored procedures centric applications and @a works perfect. For me a SQL

Re: [GENERAL] when do I analyze after concurrent index creation?

2013-10-20 Thread dinesh kumar
On Fri, Oct 18, 2013 at 9:12 PM, Tom Lane t...@sss.pgh.pa.us wrote: dinesh kumar dineshkuma...@gmail.com writes: When we create an index, i believe the postgres engine it self update it's catalog about the index availability. ANALYZE normally collects statistics about the contents of