Hi Danish, yes thats the one I was looking for. Thanks a lot!!!
On Tue, Jul 28, 2015 at 1:32 AM, dinesh kumar
wrote:
>
>
> On Mon, Jul 27, 2015 at 12:57 PM, dinesh kumar
> wrote:
>
>> On Mon, Jul 27, 2015 at 12:53 PM, Alex Magnum
>> wrote:
>>
>>> Hello,
>>>
>>> I have a csv string in a text f
On Mon, Jul 27, 2015 at 12:57 PM, dinesh kumar
wrote:
> On Mon, Jul 27, 2015 at 12:53 PM, Alex Magnum
> wrote:
>
>> Hello,
>>
>> I have a csv string in a text field that is unsorted and contains
>> duplicates.
>> Is there a simple way to remove these and sort the string.
>>
>> E.g
>> 2,18,20,23,
> Hello,
>
> I have a csv string in a text field that is unsorted and contains
> duplicates.
> Is there a simple way to remove these and sort the string.
>
> E.g
> 2,18,20,23,1,27,1,2,8,16,17,18,20,22,23,27
>
> i tried string to array and unique but that did not work...
> Any suggestions on ho
>
> I have a csv string in a text field that is unsorted and contains duplicates.
> Is there a simple way to remove these and sort the string.
>
> E.g
> 2,18,20,23,1,27,1,2,8,16,17,18,20,22,23,27
>
Do you need to eventually load the data in Postgres?
I'd personally use python to deal with th
On Mon, Jul 27, 2015 at 12:53 PM, Alex Magnum wrote:
> Hello,
>
> I have a csv string in a text field that is unsorted and contains
> duplicates.
> Is there a simple way to remove these and sort the string.
>
> E.g
> 2,18,20,23,1,27,1,2,8,16,17,18,20,22,23,27
>
> i tried string to array and uniqu
Hello,
I have a csv string in a text field that is unsorted and contains
duplicates.
Is there a simple way to remove these and sort the string.
E.g
2,18,20,23,1,27,1,2,8,16,17,18,20,22,23,27
i tried string to array and unique but that did not work...
Any suggestions on how to do this without wri
Use the Postgres window functions like rank(); this is what they're for.
http://www.postgresql.org/docs/8.4/interactive/queries-table-expressions.html#QUERIES-WINDOW
-- Darren Duncan
Alexander Farber wrote:
Hello,
I have a card game for each I'd like to introduce weekly tournaments.
I'm going
Hello,
I have a card game for each I'd like to introduce weekly tournaments.
I'm going to save the score (virtual money) won by each player into:
create table pref_money (
id varchar(32) references pref_users,
yw char(7) default to_char(current_timestamp, '
Ovid wrote on 09.05.2010 15:33:
My apologies. This isn't PG-specific, but since this is running on
PostgreSQL 8.4, maybe there are specific features which might help.
I have a tree structure in a table and it uses materialized paths to
allow me to find children quickly. However, I also need to s
On 10 May 2010, at 20:06, Greg Stark wrote:
> On Sun, May 9, 2010 at 4:47 PM, Tom Lane wrote:
>> Ovid writes:
>>> My apologies. This isn't PG-specific, but since this is running on
>>> PostgreSQL 8.4, maybe there are specific features which might help.
>>> I have a tree structure in a table and
On Sun, May 9, 2010 at 4:47 PM, Tom Lane wrote:
> Ovid writes:
>> My apologies. This isn't PG-specific, but since this is running on
>> PostgreSQL 8.4, maybe there are specific features which might help.
>> I have a tree structure in a table and it uses materialized paths to allow
>> me to find
On Sun, May 9, 2010 at 8:33 AM, Ovid wrote:
> My apologies. This isn't PG-specific, but since this is running on PostgreSQL
> 8.4, maybe there are specific features which might help.
>
> I have a tree structure in a table and it uses materialized paths to allow me
> to find children quickly. How
Ovid writes:
> My apologies. This isn't PG-specific, but since this is running on PostgreSQL
> 8.4, maybe there are specific features which might help.
> I have a tree structure in a table and it uses materialized paths to allow me
> to find children quickly. However, I also need to sort the res
My apologies. This isn't PG-specific, but since this is running on PostgreSQL
8.4, maybe there are specific features which might help.
I have a tree structure in a table and it uses materialized paths to allow me
to find children quickly. However, I also need to sort the results depth-first,
as
Hi,
On Tue, Feb 23, 2010 at 12:51 AM, Yang Zhang wrote:
> When running the query in MySQL InnoDB:
>
> $ vmstat 10
> procs ---memory-- ---swap-- -io --system--
> -cpu--
> r b swpd free buff cache si so bi bo in cs us sy id wa
> st
> 0 13 137
On Tue, Feb 23, 2010 at 00:02, Yang Zhang wrote:
> Thing is, this is how I got here:
>
> - ran complex query that does SELECT INTO.
> - that never terminated, so killed it and tried a simpler SELECT (the
> subject of this thread) from psql to see how long that would take.
You might have better lu
On Tue, Feb 23, 2010 at 9:48 AM, Yeb Havinga wrote:
> Greg Stark wrote:
>>
>> You can do \set FETCH_COUNT to have psql use a cursor automatically.
>>
>
> It seems like a big win in this case. What would be the downside of having a
> fetch_count set default in psql?
They were mentioned previously
Greg Stark wrote:
You can do \set FETCH_COUNT to have psql use a cursor automatically.
It seems like a big win in this case. What would be the downside of
having a fetch_count set default in psql?
regards
Yeb Havinga
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org
I am under the impression that MySQL does not have anything resembling
Postgres' support for regular expressions. Though some might think
that regular expressions are a sort of poor man's SQL, in any
application which manages large amounts of text they are crucial.
Postgres definitely doe
On Tue, Feb 23, 2010 at 6:48 AM, Scott Marlowe wrote:
>> I'm relieved that Postgresql itself does not, in fact, suck, but
>> slightly disappointed in the behavior of psql. I suppose it needs to
>> buffer everything in memory to properly format its tabular output,
>> among other possible reasons I
On Tue, Feb 23, 2010 at 1:48 AM, Scott Marlowe wrote:
> On Mon, Feb 22, 2010 at 10:51 PM, Yang Zhang wrote:
>> nOn Mon, Feb 22, 2010 at 3:45 PM, Scott Marlowe
>> wrote:
>>>
>>> What do things like vmstat 10 say while the query is running on each
>>> db? First time, second time, things like
On Mon, Feb 22, 2010 at 22:51, Yang Zhang wrote:
> vmstat showed no swapping-out for a while, and then suddenly it
> started spilling a lot. Checking psql's memory stats showed that it
> was huge -- apparently, it's trying to store its full result set in
> memory. As soon as I added a LIMIT 1,
On Mon, Feb 22, 2010 at 10:51 PM, Yang Zhang wrote:
> nOn Mon, Feb 22, 2010 at 3:45 PM, Scott Marlowe
> wrote:
>>
>> What do things like vmstat 10 say while the query is running on each
>> db? First time, second time, things like that.
>
> Awesome -- this actually led me to discover the prob
Yang Zhang writes:
> I'm relieved that Postgresql itself does not, in fact, suck, but
> slightly disappointed in the behavior of psql. I suppose it needs to
> buffer everything in memory to properly format its tabular output,
> among other possible reasons I could imagine.
That's half of it, and
Yang Zhang writes:
>> # select count(1) from (SELECT * from metarelcould_transactionlog
>> order by transactionid) as foo;
> Does it strike anyone else that the query optimizer/rewriter should be
> able to toss out the sort from such a query altogether?
It could, if it knew that the aggregate fu
On Mon, Feb 22, 2010 at 9:30 PM, Alex Hunsaker wrote:
> On Mon, Feb 22, 2010 at 11:10, Yang Zhang wrote:
>> I have the exact same table of data in both MySQL and Postgresql. In ?>
>> Postgresql:
>
> FWIW on a stock (unchanged postgresql.conf) 8.3.9 I get (best of 3
> runs) 79 seconds, 26 using a
nOn Mon, Feb 22, 2010 at 3:45 PM, Scott Marlowe
wrote:
> On Mon, Feb 22, 2010 at 12:53 PM, Yang Zhang wrote:
>> On Mon, Feb 22, 2010 at 2:52 PM, Scott Marlowe
>> wrote:
>>> On Mon, Feb 22, 2010 at 11:10 AM, Yang Zhang wrote:
I have the exact same table of data in both MySQL and Postgr
On Mon, Feb 22, 2010 at 11:10, Yang Zhang wrote:
> I have the exact same table of data in both MySQL and Postgresql. In ?>
> Postgresql:
FWIW on a stock (unchanged postgresql.conf) 8.3.9 I get (best of 3
runs) 79 seconds, 26 using an index and 27 seconds with it clustered.
Now yes it goes a lot
On Mon, Feb 22, 2010 at 3:33 PM, Yang Zhang wrote:
> On Mon, Feb 22, 2010 at 5:31 PM, Igor Neyman wrote:
>> When in doubt - test.
>> Why not remove index in MySQL (or create index in PostgreSQL) and see
>> what happens.
>> Why trying compare "apples and oranges"?
>
> Continue reading this thread
On Mon, Feb 22, 2010 at 3:33 PM, Yang Zhang wrote:
> On Mon, Feb 22, 2010 at 5:31 PM, Igor Neyman wrote:
>> When in doubt - test.
>> Why not remove index in MySQL (or create index in PostgreSQL) and see
>> what happens.
>> Why trying compare "apples and oranges"?
>
> Continue reading this thread
On Mon, Feb 22, 2010 at 5:31 PM, Igor Neyman wrote:
> When in doubt - test.
> Why not remove index in MySQL (or create index in PostgreSQL) and see
> what happens.
> Why trying compare "apples and oranges"?
Continue reading this thread -- I also tried using an index in Postgresql.
--
Yang Zhang
When in doubt - test.
Why not remove index in MySQL (or create index in PostgreSQL) and see
what happens.
Why trying compare "apples and oranges"?
Igor Neyman
> -Original Message-
> From: Yang Zhang [mailto:yanghates...@gmail.com]
> Sent: Monday, February 22, 2010 1:37 PM
> To: Richard
Yeb Havinga writes:
> Just reading up on this interesting thread. WFIW, 2 years ago I and a
> collegue of mine did a hardware comparison of early Intel and AMD
> desktop quadcore processors to run postgres database, with most other
> parts comparable. The intel processor was 20 to 30 % faster i
On Mon, Feb 22, 2010 at 3:44 PM, Tom Lane wrote:
> Yang Zhang writes:
>> On Mon, Feb 22, 2010 at 1:13 PM, Pavel Stehule
>> wrote:
>>> the speed depends on setting of working_memory. Try to increase a
>>> working_memory
>
>> It's already at
>> 2kB
>
> According to your original posting, yo
On Mon, Feb 22, 2010 at 12:53 PM, Yang Zhang wrote:
> On Mon, Feb 22, 2010 at 2:52 PM, Scott Marlowe
> wrote:
>> On Mon, Feb 22, 2010 at 11:10 AM, Yang Zhang wrote:
>>> I have the exact same table of data in both MySQL and Postgresql. In
>>> Postgresql:
>>
>> Just wondering, are these on the s
Yang Zhang writes:
> On Mon, Feb 22, 2010 at 1:13 PM, Pavel Stehule
> wrote:
>> the speed depends on setting of working_memory. Try to increase a
>> working_memory
> It's already at
> 2kB
According to your original posting, you're trying to sort something like
a gigabyte of data. 20MB i
Scott Marlowe wrote:
On Mon, Feb 22, 2010 at 11:10 AM, Yang Zhang wrote:
I have the exact same table of data in both MySQL and Postgresql. In Postgresql:
Just wondering, are these on the same exact machine?
Just reading up on this interesting thread. WFIW, 2 years ago I and a
col
On Mon, Feb 22, 2010 at 2:41 PM, Frank Heikens wrote:
>
> Op 22 feb 2010, om 20:28 heeft Yang Zhang het volgende geschreven:
>>
>>
>>>
>>>
> If your work-mem is too low there's a good chance that Postgres has to
> use your disks for sorting, which will obviously be quite slow.
Re
On Mon, Feb 22, 2010 at 12:50 PM, Yang Zhang wrote:
> On Mon, Feb 22, 2010 at 2:39 PM, Scott Marlowe
> wrote:
>> On Mon, Feb 22, 2010 at 12:30 PM, Yang Zhang wrote:
>>> This isn't some microbenchmark. This is part of our actual analytical
>>> application. We're running large-scale graph partiti
On Mon, Feb 22, 2010 at 2:52 PM, Scott Marlowe wrote:
> On Mon, Feb 22, 2010 at 11:10 AM, Yang Zhang wrote:
>> I have the exact same table of data in both MySQL and Postgresql. In
>> Postgresql:
>
> Just wondering, are these on the same exact machine?
>
Yes, on the same disk.
--
Yang Zhang
htt
On Mon, Feb 22, 2010 at 11:10 AM, Yang Zhang wrote:
> I have the exact same table of data in both MySQL and Postgresql. In
> Postgresql:
Just wondering, are these on the same exact machine?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscripti
On Mon, Feb 22, 2010 at 2:39 PM, Scott Marlowe wrote:
> On Mon, Feb 22, 2010 at 12:30 PM, Yang Zhang wrote:
>> This isn't some microbenchmark. This is part of our actual analytical
>> application. We're running large-scale graph partitioning algorithms.
>
> It's important to see how it runs if yo
Op 22 feb 2010, om 20:28 heeft Yang Zhang het volgende geschreven:
If your work-mem is too low there's a good chance that Postgres
has to
use your disks for sorting, which will obviously be quite slow.
Relative to the non-terminating 80-minute-so-far sort, Unix sort
runs
much faster
On Mon, Feb 22, 2010 at 12:30 PM, Yang Zhang wrote:
> This isn't some microbenchmark. This is part of our actual analytical
> application. We're running large-scale graph partitioning algorithms.
It's important to see how it runs if you can fit more / most of the
data set into memory by cranking
On Mon, Feb 22, 2010 at 2:27 PM, Alvaro Herrera
wrote:
> Yang Zhang escribió:
>> I have the exact same table of data in both MySQL and Postgresql. In
>> Postgresql:
>
> I just noticed two things:
>
> [snip lots of stuff]
>
> 1.
>
>> ) ENGINE=MyISAM AUTO_INCREMENT=50410166 DEFAULT CHARSET=latin1
>
Yang Zhang escribió:
> I have the exact same table of data in both MySQL and Postgresql. In
> Postgresql:
I just noticed two things:
[snip lots of stuff]
1.
> ) ENGINE=MyISAM AUTO_INCREMENT=50410166 DEFAULT CHARSET=latin1
You're doing a comparison to MyISAM.
2.
> select * from metarelclo
On Mon, Feb 22, 2010 at 2:15 PM, Frank Heikens wrote:
>
> Op 22 feb 2010, om 20:07 heeft Yang Zhang het volgende geschreven:
>
>> On Mon, Feb 22, 2010 at 1:48 PM, Alban Hertroys
>> wrote:
>>>
>>> On 22 Feb 2010, at 19:35, Yang Zhang wrote:
>>>
I also wouldn't have imagined an external merge-
Op 22 feb 2010, om 20:07 heeft Yang Zhang het volgende geschreven:
On Mon, Feb 22, 2010 at 1:48 PM, Alban Hertroys
wrote:
On 22 Feb 2010, at 19:35, Yang Zhang wrote:
I also wouldn't have imagined an external merge-sort as being very
Where's that external merge-sort coming from? Can you s
On Mon, Feb 22, 2010 at 2:03 PM, Alvaro Herrera
wrote:
> Yang Zhang escribió:
>
>> I'm running:
>>
>> select * from metarelcloud_transactionlog order by transactionid;
>>
>> It takes MySQL 6 minutes, but Postgresql is still running after 70
>> minutes. Is there something like a glaring misconfig
On Mon, Feb 22, 2010 at 1:48 PM, Alban Hertroys
wrote:
> On 22 Feb 2010, at 19:35, Yang Zhang wrote:
>
>> I also wouldn't have imagined an external merge-sort as being very
>
>
> Where's that external merge-sort coming from? Can you show an explain analyze?
I just assumed that the "Sort" in the E
Yang Zhang escribió:
> I'm running:
>
> select * from metarelcloud_transactionlog order by transactionid;
>
> It takes MySQL 6 minutes, but Postgresql is still running after 70
> minutes. Is there something like a glaring misconfiguration that I'm
> overlooking? Thanks in advance.
How large i
On 22 Feb 2010, at 19:35, Yang Zhang wrote:
> I also wouldn't have imagined an external merge-sort as being very
Where's that external merge-sort coming from? Can you show an explain analyze?
If your work-mem is too low there's a good chance that Postgres has to use your
disks for sorting, whi
Op 22 feb 2010, om 19:30 heeft Richard Broersma het volgende geschreven:
On Mon, Feb 22, 2010 at 10:17 AM, Frank Heikens
wrote:
There is no index on the column transactionid in your PostgreSQL-
table, as
there is in your MySQL-table. This explains the difference.
CREATE INDEX i_transacti
On Mon, Feb 22, 2010 at 1:30 PM, Richard Broersma
wrote:
> On Mon, Feb 22, 2010 at 10:17 AM, Frank Heikens wrote:
>
>> There is no index on the column transactionid in your PostgreSQL-table, as
>> there is in your MySQL-table. This explains the difference.
>>
>> CREATE INDEX i_transactionid ON pu
On Mon, Feb 22, 2010 at 1:13 PM, Pavel Stehule wrote:
> hello
>
> the speed depends on setting of working_memory. Try to increase a
> working_memory
>
> set working_memory to '10MB';
It's already at
tpcc=# show work_mem;
work_mem
--
2kB
(1 row)
I also wouldn't have imagined an ex
On Mon, Feb 22, 2010 at 10:17 AM, Frank Heikens wrote:
> There is no index on the column transactionid in your PostgreSQL-table, as
> there is in your MySQL-table. This explains the difference.
>
> CREATE INDEX i_transactionid ON public.metarelcloud_transactionlog
> (transactionid);
Does an inde
There is no index on the column transactionid in your PostgreSQL-
table, as there is in your MySQL-table. This explains the difference.
CREATE INDEX i_transactionid ON public.metarelcloud_transactionlog
(transactionid);
Op 22 feb 2010, om 19:10 heeft Yang Zhang het volgende geschreven:
I h
hello
the speed depends on setting of working_memory. Try to increase a working_memory
set working_memory to '10MB';
Regards
Pavel Stehule
2010/2/22 Yang Zhang :
> I have the exact same table of data in both MySQL and Postgresql. In
> Postgresql:
>
> tpcc=# \d metarelcloud_transactionlog
>
I have the exact same table of data in both MySQL and Postgresql. In Postgresql:
tpcc=# \d metarelcloud_transactionlog
Table
"public.metarelcloud_transactionlog"
Column| Type |
Modifiers
-+---
http://www.postgresqlcertification.org/jta/2008/results
Having point 4 as an example:
For how long have you been a PostgreSQL database administrator?
Less than 1 year36
I wish.
"Andrus" <[EMAIL PROTECTED]> writes:
> User interface need to show nulls as empty strings.
> PostgreSQL sorts nulls after all data.
>...
> Select statements are generated dynamically by driver and it is not easy
> to change them to generate order by coalesce( testcol,'').
You could use NULLS FIRS
On Mon, Apr 28, 2008 at 08:05:45PM +0300, Andrus wrote:
> User interface need to show nulls as empty strings.
> PostgreSQL sorts nulls after all data.
>
> create temp table test ( testcol char(10) );
> insert into test values ( null);
> insert into test values ( 'test');
> insert into test values
User interface need to show nulls as empty strings.
PostgreSQL sorts nulls after all data.
create temp table test ( testcol char(10) );
insert into test values ( null);
insert into test values ( 'test');
insert into test values ( '');
select * from test order by testcol;
This confuses users who e
Andrus wrote:
User interface need to show nulls as empty strings.
PostgreSQL sorts nulls after all data.
create temp table test ( testcol char(10) );
insert into test values ( null);
insert into test values ( 'test');
insert into test values ( '');
select * from test order by testcol;
This conf
Thanks,
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andreas
Kretschmer
Sent: Monday, January 08, 2007 11:19 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Sorting
Ragnar <[EMAIL PROTECTED]> schrieb:
> > test=*# select w,
Ragnar <[EMAIL PROTECTED]> schrieb:
> > test=*# select w, case when w ~ '^[0-9]*$' then w::int else 1 end from
> > foo order by 2,1;
>
> possible improvements:
> a) w ~ '^[0-9]+$'
> b) use NULL instead of 1
Thanks, right.
Andreas
--
Really, I'm not out to destroy Microsoft. That w
On mán, 2007-01-08 at 17:59 +0100, A. Kretschmer wrote:
> am Mon, dem 08.01.2007, um 10:21:38 -0600 mailte Bart McFarling folgendes:
> > I have a column that is a varchar(6) I need to sort it by the rows that are
> > integers 1st then the character ones or vice versa, I just need the values
> > t
am Mon, dem 08.01.2007, um 10:21:38 -0600 mailte Bart McFarling folgendes:
> I have a column that is a varchar(6) I need to sort it by the rows that are
> integers 1st then the character ones or vice versa, I just need the values
> that
> can be converted to integer to sort by their numeric value
I have a column that is a varchar(6) I need to sort it by the rows that
are integers 1st then the character ones or vice versa, I just need the
values that can be converted to integer to sort by their numeric value.
i.e
1, 2, 3, 4, 5, 10, 11, A, B, C
instead of
1, 10, 11, 2, 3, 4, 5, A, B, C
An
It does allow you to sort on both columns.
SELECT DISTINCT ON (path) path, comment_id, created, title
FROM bewertungen.tblcomments ORDER BY path, created
Thank you very much. Works perfect! :-)
---(end of broadcast)---
TIP 3: Have you
Nico Grubert <[EMAIL PROTECTED]> writes:
> My first try was this SQL query:
>
> SELECT DISTINCT ON (path) path, comment_id, created, title
> FROM bewertungen.tblcomments
>
> This does not allow me to append "ORDER BY created" since I can only sort on
> path because of DISTINCT ON (path).
I
Hi there,
I have a problem sorting a SQL result if I use DISTINCT ON.
I have a table "tblcomment" with these columns:
id (serial)
path (varchar)
created (timestamp)
title (varchar)
These records are in the table "tblcomment":
id pathcreated title
--
On Thu, Dec 22, 2005 at 08:38:46AM -0700, Pete Deffendol wrote:
> Hi,
>
> Can anyone point me toward an SQL function (whether built-in or an
> add-on) that will allow me to sort the contents of an array datatype
> in an SQL query?
>
> Something like this:
>
> select sort(my_array_field) from my_
On Thu, Dec 22, 2005 at 08:38:46AM -0700, Pete Deffendol wrote:
> Can anyone point me toward an SQL function (whether built-in or an add-on)
> that will allow me to sort the contents of an array datatype in an SQL
> query?
For integer arrays see contrib/intarray.
SELECT sort('{5,2,3,1,9,7}'::int[
Hi,
Can anyone point me toward an SQL function (whether built-in or an
add-on) that will allow me to sort the contents of an array datatype in
an SQL query?
Something like this:
select sort(my_array_field) from my_table;
Thanks!
Pete
Nico Grubert wrote:
> Ah, I found it:
>
> lc_collate: [EMAIL PROTECTED]
> lc_ctype: [EMAIL PROTECTED]
This is an iso-8859-15 locale, isn't it?
If your database encoding is UNICODE, I believe you'd have more success
using an UTF8 locale, such as de_DE.UTF-8 in your case.
--
Dani
I have a problem when sorting records with:
SELECT * FROM table WHERE name LIKE 'Ö%'
I am running Postgres 8.02 with a database whose character encoding is
UNICODE.
The SQL Query
SELECT *
FROM member
WHERE name LIKE 'O%'
OR
name like 'Ö%'
ORDER BY name
re
Ah, I found it:
lc_collate: [EMAIL PROTECTED]
lc_ctype: [EMAIL PROTECTED]
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
... but what locale is it using? (See LC_COLLATE and LC_CTYPE.)
Can I find out out these settings in "phpPgAdmin"?
Or can I use LC_COLLATE and LC_CTYPE in the SQL Query?
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ig
Nico Grubert <[EMAIL PROTECTED]> writes:
> I have a problem when sorting records with:
> SELECT * FROM table WHERE name LIKE 'Ö%'
> I am running Postgres 8.02 with a database whose character encoding is
> UNICODE.
... but what locale is it using? (See LC_COLLATE and LC_CTYPE.)
Hi there,
I have a problem when sorting records with:
SELECT * FROM table WHERE name LIKE 'Ö%'
I am running Postgres 8.02 with a database whose character encoding is
UNICODE.
The SQL Query
SELECT *
FROM member
WHERE name LIKE 'O%'
OR
name like 'Ö%'
ORDER BY
On Mon, Aug 15, 2005 at 11:30:32PM +0200, Andreas Seltenreich wrote:
>
> This would be one possibility. If you don't want your application to
> deal with transactions being aborted because of non-serializable
> transactions, you could alternatively use explicit locking (SELECT ...
> FOR UPDATE) co
Bill Moseley schrob:
> On Sat, Aug 13, 2005 at 06:44:09PM +0200, Andreas Seltenreich wrote:
>> > 3) Oh, and I have also this for checking IF there are items in
>> > "region" that are "above" the item in question -- to see IF an item
>> > can or cannot be moved up in the sort order relative to othe
On Sat, Aug 13, 2005 at 06:44:09PM +0200, Andreas Seltenreich wrote:
> > 3) Oh, and I have also this for checking IF there are items in
> > "region" that are "above" the item in question -- to see IF an item
> > can or cannot be moved up in the sort order relative to others.
> >
> > SELECT id F
Bill Moseley schrob:
> create table region {
> id SERIAL PRIMARY KEY,
> nametext,
> -- order this table should be sorted in
> -- a "1" is the top sort level
> sort_order integer
> );
>
> create table city {
> id SERIAL PRIMARY KEY,
> nametext,
I have a few beginner questions about using related tables for
sorting.
create table region {
id SERIAL PRIMARY KEY,
nametext,
-- order this table should be sorted in
-- a "1" is the top sort level
sort_order integer
);
create table city {
id SERIAL
On Tue, 2005-05-03 at 13:29 -0400, Robert Fitzpatrick wrote:
> I have a column that I want to sort by certain values. The values are
> Unit, Exterior and Common. I want all the records with Unit first,
> Common second and Exterior last in the sort order. These are the only 3
> possible values, is t
On Tue, 2005-05-03 at 12:29, Robert Fitzpatrick wrote:
> I have a column that I want to sort by certain values. The values are
> Unit, Exterior and Common. I want all the records with Unit first,
> Common second and Exterior last in the sort order. These are the only 3
> possible values, is there a
You can order by conditions, lets say column='Unit'. The evaluation of
a conditions will give you 't' or 'f', and alfabetically 'f' <
't'... you should use DESC to get the matches first. So, it would be
more or less like this:
ORDER BY
column='Unit' DESC,
column='Exterior' DESC,
column='C
I have a column that I want to sort by certain values. The values are
Unit, Exterior and Common. I want all the records with Unit first,
Common second and Exterior last in the sort order. These are the only 3
possible values, is there a way to sort manually like that with the
alphanumeric values?
> Great, that works out fine!
>
> So, the SQL I tested with is:
> select * from mytable order by convert(name, 'utf8', 'gb18030');
Sorry, what I wanted to say was:
SELECT * FROM t1 WHERE ... ORDER BY CONVERT(your_chinese_character using
utf_8_to_gb_18030);
Of course your example is fine too (a
Great, that works out fine!
So, the SQL I tested with is:
select * from mytable order by convert(name, 'utf8', 'gb18030');
It produces the correct output.
Thanks Tatsuo!
Jian
On Tue, 29 Mar 2005 10:25:58 +0900 (JST), Tatsuo Ishii
<[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I installed postgres
> Hi,
>
> I installed postgres 8.0 for windows on my win xp (Simplified Chinese
> version). The encoding is unicode. When I set pgsql client encoding to
> gb18030, I could insert Chinese text from the command line to
> postgres.
>
> However, I could not get the sort order of Chinese varchar field
>Hi,
>
>I installed postgres 8.0 for windows on my win xp (Simplified Chinese
>version). The encoding is unicode. When I set pgsql client encoding to
>gb18030, I could insert Chinese text from the command line to
>postgres.
>
>However, I could not get the sort order of Chinese varchar field to
>wor
Hi,
I installed postgres 8.0 for windows on my win xp (Simplified Chinese
version). The encoding is unicode. When I set pgsql client encoding to
gb18030, I could insert Chinese text from the command line to
postgres.
However, I could not get the sort order of Chinese varchar field to
work properl
> On Tue, 8 Feb 2005 01:10 pm, CoL wrote:
>> hi,
>>
>> Berend Tober wrote, On 2/7/2005 22:20:
>> > I encountered what looks like unusually sorting behavior, and I'm
>> wondering if
>> > anyone can tell me if this is supposted to happen (and then if so, why) or
>> if
>> > this is a bug:
---
On Tue, 8 Feb 2005 01:10 pm, CoL wrote:
> hi,
>
> Berend Tober wrote, On 2/7/2005 22:20:
> > I encountered what looks like unusually sorting behavior, and I'm wondering
> > if
> > anyone can tell me if this is supposted to happen (and then if so, why) or
> > if
> > this is a bug:
> >
> >
> > S
hi,
Berend Tober wrote, On 2/7/2005 22:20:
I encountered what looks like unusually sorting behavior, and I'm wondering if
anyone can tell me if this is supposted to happen (and then if so, why) or if
this is a bug:
CREATE TABLE sample_table
(
account_id varchar(4),
account_name varchar(25)
)
WI
On Mon, 7 Feb 2005, Berend Tober wrote:
> I encountered what looks like unusually sorting behavior, and I'm wondering if
> anyone can tell me if this is supposted to happen (and then if so, why) or if
> this is a bug:
If you ran initdb with a locale such as en_US, a result like what you got
is ex
On Mon, Feb 07, 2005 at 16:20:36 -0500,
Berend Tober <[EMAIL PROTECTED]> wrote:
>
> SELECT * FROM sample_table ORDER BY 1;
>
> account_id,account_name
> 100,First account
> 110,Second account
> *115,Fifth account
> 120,Third account
> *125,Fourth account
>
> I would expect to see
>
> account_
1 - 100 of 172 matches
Mail list logo