Re: which charset use for cyrilic?

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Zet <skyer(at)on(dot)kg>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: which charset use for cyrilic?
Date: 2005-10-29 09:38:31
Message-ID: Pine.GSO.4.63.0510291334210.29329@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Zet,

there is pgsql-ru-general list (russian), btw.
see http://www.postgresql.org/community/lists/subscribe for
subscription info.

You did't get us enough info and examples (cut'n paste form psql would be
nice).

Oleg
On Sat, 29 Oct 2005, Zet wrote:

> Hi
>
> Which charset is need to be set in database for cyrilic?
>
> I've used till now WIN, but today I found a problem
>
> for example:
>
> SELECT *
> FROM table
> WHERE a = 'слово'
>
> returns me a record, where a = 'фраза'
>
> after I tried UNICODE
> but for most of cyrilic words PG gives error like
> "invalid byte sequence for encoding "UNICODE":..."
>
> Regards,
> Zet
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
>From pgsql-general-owner(at)postgresql(dot)org Sat Oct 29 12:08:04 2005
X-Original-To: pgsql-general-postgresql(dot)org(at)localhost(dot)postgresql(dot)org
Received: from localhost (av.hub.org [200.46.204.144])
by svr1.postgresql.org (Postfix) with ESMTP id 2B977DB330
for <pgsql-general-postgresql(dot)org(at)localhost(dot)postgresql(dot)org>; Sat, 29 Oct 2005 12:08:03 -0300 (ADT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024)
with ESMTP id 65280-05
for <pgsql-general-postgresql(dot)org(at)localhost(dot)postgresql(dot)org>;
Sat, 29 Oct 2005 15:08:00 +0000 (GMT)
Received: from wolff.to (wolff.to [66.93.197.194])
by svr1.postgresql.org (Postfix) with SMTP id 274F1DB325
for <pgsql-general(at)postgresql(dot)org>; Sat, 29 Oct 2005 12:07:59 -0300 (ADT)
Received: (qmail 1780 invoked by uid 500); 29 Oct 2005 15:09:53 -0000
Date: Sat, 29 Oct 2005 10:09:53 -0500
From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: NosyMan <nosyman(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Can I use variable to store sql data?
Message-ID: <20051029150953(dot)GA29677(at)wolff(dot)to>
Mail-Followup-To: Bruno Wolff III <bruno(at)wolff(dot)to>,
NosyMan <nosyman(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
References: <20051016175758(dot)97106(dot)qmail(at)web32713(dot)mail(dot)mud(dot)yahoo(dot)com> <200510170955(dot)50217(dot)nosyman(at)gmail(dot)com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200510170955(dot)50217(dot)nosyman(at)gmail(dot)com>
User-Agent: Mutt/1.4.2.1i
X-Virus-Scanned: by amavisd-new at hub.org
X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006]
X-Spam-Score: 0.006
X-Spam-Level:
X-Archive-Number: 200510/1791
X-Sequence-Number: 86019

Please post questions to relevant lists. This question did not belong on
the patches list. I have moved the discussion to the general list.

Please don't reply to other threads to start new ones. This messes up the
archives and won't help people see your question.

On Mon, Oct 17, 2005 at 09:55:50 +0300,
NosyMan <nosyman(at)gmail(dot)com> wrote:
> Hi,
>
> The scenario:
> SELECT id_product FROM products WHERE product_code='PRD-030';
>
> Now I want to insert id_product into another table :
>
> INSERT INTO product_sales( id_product, sale_date)
> INSERT INTO product_sales( id_product, sale_date)
> INSERT INTO product_sales( id_product, sale_date)

You can do something like:
INSERT INTO product_sales values (
(SELECT id_product FROM products WHERE product_code='PRD-030'),
sales_date);

Also if id_product was just assigned a value from a sequence in the same
session, you could use the currval function to get its value.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jens Frank 2005-10-29 12:22:38 Re: [Mapbender-users] postgis / mediawiki / postgresql was Re: [Freegis-list] Re: [GENERAL] Map of Postgresql Users (OT)
Previous Message Zet 2005-10-29 09:11:46 which charset use for cyrilic?