Skip site navigation (1) Skip section navigation (2)

Re: Why would queries fail with 'could not stat file' after CLUSTER?

From: raghu ram <raghuchennuru(at)gmail(dot)com>
To: Sashbeer Bhandari <sashbeer(at)gmail(dot)com>
Cc: David Schnur <dnschnur(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Why would queries fail with 'could not stat file' after CLUSTER?
Date: 2012-04-10 06:19:39
Message-ID: CALnrrJTq0C3dqdM0yyOFZQJwNzYJCWLoEWxWuk_6ZKTa_ZwTmQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Tue, Apr 10, 2012 at 10:00 AM, Sashbeer Bhandari <sashbeer(at)gmail(dot)com>wrote:

> Hi
> Good Morning,
>
> I am using Postgresql DB 8.2 and my encoding is in SQL_ASCII ,. I want to
> convert it in UTF8, Please help me it.
>
>
Convert a database in the SQL_ASCII format into one of the UTF-8 format::

template1=# create database test with encoding='SQL_ASCII';

CREATE DATABASE

template1=# \connect test

You are now connected to database "test".

test=# create table a (x text);

CREATE TABLE

test=# insert into a values ('');

test=# select * from a;

x

--


 (1 row)


 *test=# update pg_database set encoding =*

*pg_catalog.pg_char_to_encoding('UTF8') where datname='test';*

UPDATE 1

test=# select * from a;

x

--


 (1 row)


 test=# \connect template1

You are now connected to database "template1".

template1=# \connect test

You are now connected to database "test".

test=# select * from a;

x

--


 (1 row)


--Raghu

In response to

pgsql-admin by date

Next:From: robinDate: 2012-04-10 07:19:58
Subject: Re: Giant Postgresql Database Cluster Folder
Previous:From: raghu ramDate: 2012-04-10 06:14:08
Subject: Re: Giant Postgresql Database Cluster Folder

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group