Re: [HACKERS] [PATCH] Regression test fix for Czech locale

2009-03-09 Thread Peter Eisentraut

Zdenek Kotala wrote:

I attached fix which modify foreign_data test. It fix problem with Czech
collation when numbers are ordered after letters. I retyped affected
column to name datatype which uses bitwise cmp.


I have chosen a different fix: rename the identifiers so the ordering 
problem doesn't arise.  Czech locale should work now.


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] [PATCH] Regression test fix for Czech locale

2009-03-06 Thread Zdenek Kotala
I attached fix which modify foreign_data test. It fix problem with Czech
collation when numbers are ordered after letters. I retyped affected
column to name datatype which uses bitwise cmp.


Zdenek 
diff -Nrc pgsql_psql.c3158b216657/src/test/regress/expected/foreign_data.out pgsql_psql/src/test/regress/expected/foreign_data.out
*** pgsql_psql.c3158b216657/src/test/regress/expected/foreign_data.out	2009-03-06 12:55:46.721051870 +0100
--- pgsql_psql/src/test/regress/expected/foreign_data.out	2009-03-06 12:55:46.726090204 +0100
***
*** 628,634 
  (8 rows)
  
  -- Information schema
! SELECT * FROM information_schema.foreign_data_wrappers ORDER BY 1, 2;
   foreign_data_wrapper_catalog | foreign_data_wrapper_name | authorization_identifier | library_name | foreign_data_wrapper_language 
  --+---+--+--+---
   regression   | dummy | foreign_data_user|  | c
--- 628,634 
  (8 rows)
  
  -- Information schema
! SELECT * FROM information_schema.foreign_data_wrappers ORDER BY foreign_data_wrapper_catalog, foreign_data_wrapper_name;
   foreign_data_wrapper_catalog | foreign_data_wrapper_name | authorization_identifier | library_name | foreign_data_wrapper_language 
  --+---+--+--+---
   regression   | dummy | foreign_data_user|  | c
***
*** 636,648 
   regression   | postgresql| foreign_data_user|  | c
  (3 rows)
  
! SELECT * FROM information_schema.foreign_data_wrapper_options ORDER BY 1, 2, 3;
   foreign_data_wrapper_catalog | foreign_data_wrapper_name | option_name  | option_value 
  --+---+--+--
   regression   | foo   | test_wrapper | true
  (1 row)
  
! SELECT * FROM information_schema.foreign_servers ORDER BY 1, 2;
   foreign_server_catalog | foreign_server_name | foreign_data_wrapper_catalog | foreign_data_wrapper_name | foreign_server_type | foreign_server_version | authorization_identifier 
  +-+--+---+-++--
   regression | s4  | regression   | foo   | oracle  || foreign_data_user
--- 636,648 
   regression   | postgresql| foreign_data_user|  | c
  (3 rows)
  
! SELECT * FROM information_schema.foreign_data_wrapper_options ORDER BY foreign_data_wrapper_catalog, foreign_data_wrapper_name, option_name;
   foreign_data_wrapper_catalog | foreign_data_wrapper_name | option_name  | option_value 
  --+---+--+--
   regression   | foo   | test_wrapper | true
  (1 row)
  
! SELECT * FROM information_schema.foreign_servers ORDER BY foreign_server_catalog, foreign_server_name::name;
   foreign_server_catalog | foreign_server_name | foreign_data_wrapper_catalog | foreign_data_wrapper_name | foreign_server_type | foreign_server_version | authorization_identifier 
  +-+--+---+-++--
   regression | s4  | regression   | foo   | oracle  || foreign_data_user
***
*** 653,659 
   regression | st2 | regression   | foo   | || regress_test_role
  (6 rows)
  
! SELECT * FROM information_schema.foreign_server_options ORDER BY 1, 2, 3;
   foreign_server_catalog | foreign_server_name |   option_name   | option_value 
  +-+-+--
   regression | s4  | dbname  | b
--- 653,659 
   regression | st2 | regression   | foo   | || regress_test_role
  (6 rows)
  
! SELECT * FROM information_schema.foreign_server_options ORDER BY foreign_server_catalog, foreign_server_name::name, option_name;
   foreign_server_catalog | foreign_server_name |   option_name   | option_value 
  +-+-+--
   regression | s4   

Re: [HACKERS] [PATCH] Regression test fix for Czech locale

2009-03-06 Thread Alvaro Herrera
Zdenek Kotala wrote:
 I attached fix which modify foreign_data test. It fix problem with Czech
 collation when numbers are ordered after letters. I retyped affected
 column to name datatype which uses bitwise cmp.

I have trouble understanding why this makes any sense at all.  The only
thing you seem to be doing here is replacing the ORDER BY column-number
clauses by others that reference the column by name.

Isn't this a bug in how column numbers are (not) being used by ORDER BY?



-- 
Alvaro Herrerahttp://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] [PATCH] Regression test fix for Czech locale

2009-03-06 Thread Zdenek Kotala

Alvaro Herrera píše v pá 06. 03. 2009 v 12:16 -0300:
 Zdenek Kotala wrote:
  I attached fix which modify foreign_data test. It fix problem with Czech
  collation when numbers are ordered after letters. I retyped affected
  column to name datatype which uses bitwise cmp.
 
 I have trouble understanding why this makes any sense at all.  The only
 thing you seem to be doing here is replacing the ORDER BY column-number
 clauses by others that reference the column by name.

And I cast foreign_server_name to name datatype (which is original
datatype in catalog table). See my buildfarm member:

http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=gothic_mothdt=2009-03-04%2021:06:01

for details.

 Isn't this a bug in how column numbers are (not) being used by ORDER BY?

you cannot use 3::name. It is reason why I replaced numbers with names
and I did it for all select here. It has seemed that is better idea do
it everywhere and be consistent.

Zdenek


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers