Re: [ADMIN] Importing data - possible UTF8 import bug?

2008-07-10 Thread Tom Lane
"Mikel Lindsaar" <[EMAIL PROTECTED]> writes: > But I am hitting a problem. When I try to import the result with COPY > I am getting: > ERROR: invalid byte sequence for encoding "UTF8": 0xa2 > And gives me a line reference. > I then grabbed that line out of the file, unpacked each byte into a > de

Re: [ADMIN] Importing data - possible UTF8 import bug?

2008-07-10 Thread Mikel Lindsaar
> Anyone got any ideas how I can hunt down what is in this row, visually > looking at it hasn't helped? As a followup, I am getting this same sort of error at various points on the file. So I tried taking the line, and cleaning it with Iconv and turning it into an ASCII sequence and inserting it

[ADMIN] Importing data - possible UTF8 import bug?

2008-07-10 Thread Mikel Lindsaar
Hi all, I am importing a bunch of data exported from an Oracle database. This came out as a flat file, tab delimited. I have parsed this through a ruby script that does the following: For each line split it at the tab for each column parse it through Iconv and convert from UTF8 to UTF8

Re: [ADMIN] query optimization

2008-07-10 Thread Tom Lane
On Thu, Jul 10, 2008 at 3:45 AM, Suresh Borse <[EMAIL PROTECTED]> wrote: >> The view executes very faster for the first time. >> When I execute the view again and again suddenly it gets slow or it gets >> hang. >> The view contains multi-table joins. Uh, how many joins? If you're exceeding geqo_t

Re: [ADMIN] query optimization

2008-07-10 Thread Scott Marlowe
On Thu, Jul 10, 2008 at 3:45 AM, Suresh Borse <[EMAIL PROTECTED]> wrote: > > Good Afternoon !!! > > The view executes very faster for the first time. > > When I execute the view again and again suddenly it gets slow or it gets > hang. > > I have also traced the query plan but it changes for each ex

Re: [ADMIN] create database with template question

2008-07-10 Thread Scott Marlowe
On Thu, Jul 10, 2008 at 7:24 AM, Dev <[EMAIL PROTECTED]> wrote: > Hi, > > I have a database with a table and some triggers and functions set > on it. I converted it into a template setting the fields datallowcon=false > and datistemplate=true on it. Lets assume this template(database) is ca

[ADMIN] create database with template question

2008-07-10 Thread Dev
Hi,     I have a database with a table and some triggers and functions set on it. I converted it into a template setting the fields datallowcon=false and datistemplate=true on it. Lets assume this template(database) is called as mytemplate. Now, as a normal database user I issue the create

Re: [ADMIN] query optimization

2008-07-10 Thread Julius Tuskenis
Please send the "explain analyze YOUR_QUERY" output after first run and later. Also please mention platform and pg version you are using. Suresh Borse rašė: Good Afternoon !!! The view executes very faster for the first time. When I execute the view again and again suddenly it gets slow or

Re: [ADMIN] query optimization

2008-07-10 Thread Suresh Borse
Good Afternoon !!! The view executes very faster for the first time. When I execute the view again and again suddenly it gets slow or it gets hang. I have also traced the query plan but it changes for each execution.Can we fix the query plan. I have also tested the view on my test machine but

Re: [ADMIN] create role syntax

2008-07-10 Thread Dev
Well! answering my own question using " works ! /Dev --- On Thu, 7/10/08, Dev <[EMAIL PROTECTED]> wrote: From: Dev <[EMAIL PROTECTED]> Subject: [ADMIN] create role syntax To: pgsql-admin@postgresql.org Date: Thursday, July 10, 2008, 10:30 AM Hi,   Is it possible to have numbers as role nam

Re: [ADMIN] query optimization

2008-07-10 Thread Julius Tuskenis
Hello, Suresh Maybe its taking long for the first time, and then its faster? Did you noticed any circumstances under witch your query takes longer to execute? Suresh Borse rašė: Dear All, I am facing very strange problem in postgres while executing the view. When I execute the view some ti

[ADMIN] query optimization

2008-07-10 Thread Suresh Borse
Dear All, I am facing very strange problem in postgres while executing the view. When I execute the view some times it takes few milliseconds, sometimes it take several seconds and some times doesn't execute. I tried to troubleshoot using the explain plan method. But explain plan also changes fo

[ADMIN] create role syntax

2008-07-10 Thread Dev
Hi,   Is it possible to have numbers as role names? I tried doing something like create role 1 login createdb but I get a syntax error, however if I have an alphabet before the number it seems to work. For example like create role x1 login createdb /Dev