[BUGS] password auth woes on sparc64/FreeBSD

2007-06-05 Thread Volodymyr Kostyrko
It seems to me that auth on the local interface(?) is broken somehow on 
sparc64.


[data/pg_hba.conf]
local postgres,template1 all trust

local postgres,template1 all md5
host postgres,template1 all 0.0.0.0/0 md5
host postgres,template1 all ::/0 md5
[--]

Well, what I really want to do is to remove the trust line from config. 
But that way i need a .pgpass file so the server can start/control 
itself without asking me for password. And if i want .pgpass file i need 
some auth.


[session transcript/same machine]
> psql -U pgsql postgres
Welcome to psql 8.2.4, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
   \h for help with SQL commands
   \? for help with psql commands
   \g or terminate with semicolon to execute query
   \q to quit

postgres=# alter role pgsql password 'somepass';
ALTER ROLE
postgres=# \q
> psql -h localhost -U pgsql postgres
Password for user pgsql:
psql: FATAL:  password authentication failed for user "pgsql"
[--]

It fails for any user and any password.

[session transcript/other machine]
> psql -h blade -U pgsql postgres
Password for user pgsql:
Welcome to psql 8.2.4, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
   \h for help with SQL commands
   \? for help with psql commands
   \g or terminate with semicolon to execute query
   \q to quit

postgres=#
[--]

But I can log from another machine flawlessly...

> uname -a
FreeBSD blade.lan 6.2-STABLE FreeBSD 6.2-STABLE #13: Tue Jun  5 17:06:57 
EEST 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/BLADE  sparc64


PS: Can assist in debugging if someone would point me what and how.

--
Sphinx of black quartz judge my vow!

---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

   http://www.postgresql.org/about/donate


Re: [BUGS] password auth woes on sparc64/FreeBSD

2007-06-12 Thread Volodymyr Kostyrko

Zdenek Kotala wrote:
I tested on Solaris AMD64 and Sparc v240 (64bit) and it works for me. Do 
you use 32bit or 64bit version of postgreSQL and what you have in .pgpass?


I use sparc64 and my .pgpass file was like:
localhost:5432:*:pgsql:password

Actually i have already found the cause. Authorization fails when 
postgresql-client was compiled with -O3 but it works otherwise. Maybe it 
is just another gcc optimization issue.


--
Sphinx of black quartz judge my vow!

---(end of broadcast)---
TIP 6: explain analyze is your friend


[BUGS] unicode strings are not sorted alphabetically

2004-08-05 Thread Volodymyr Kostyrko
  This applies to non-english strings (in my case - russian). I've 
stumbled upon it on version 7.3.4. ( PostgreSQL 7.4.3 on 
i386-portbld-freebsd5.2.1, compiled by GCC cc (GCC) 3.3.3 [FreeBSD] 
20031106)

  The attached files where created with:
pg_dump -U lib lib > database_dump
psql lib lib -c "select * from authors order by name" > result_of_query
  The sorting order seem to be incorrect. Alpabetically they should be 
sorted by 'id's as:

  1
  2
  3
  5
  4
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
  There's also another question on it. The russian alhabet differs from 
ukrainian alphabet, so sorting should occur in different order. But the 
order, provided by unicode charmap isn't good for any of them. This 
probably applies to any Cyrillic charset.

--
[WBR], Arcade. [SAT Astronomy/Think to survive!]
--
-- PostgreSQL database dump
--

SET client_encoding = 'UNICODE';
SET check_function_bodies = false;

SET SESSION AUTHORIZATION 'pgsql';

--
-- TOC entry 4 (OID 2200)
-- Name: public; Type: ACL; Schema: -; Owner: pgsql
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
GRANT ALL ON SCHEMA public TO PUBLIC;


SET SESSION AUTHORIZATION 'lib';

SET search_path = public, pg_catalog;

--
-- TOC entry 5 (OID 69028)
-- Name: authors; Type: TABLE; Schema: public; Owner: lib
--

CREATE TABLE authors (
id serial NOT NULL,
name character varying(256)
);


--
-- Data for TOC entry 9 (OID 69028)
-- Name: authors; Type: TABLE DATA; Schema: public; Owner: lib
--

COPY authors (id, name) FROM stdin;
1   Андерсон, Пол
2   Азимов, Айзек
3   Асприн, Роберт
4   Булгаков, Михаил
5   Брэдбери, Рей
6   Гамильтон, Эдмонд
7   Гаррисон, Гарри
8   Даррелл, Джеральд
9   Дойл, Артур Конан
10  Кинг, Стивен
11  Кларк, Артур
12  Лукьяненко, Сергей
13  Желязны, Роджер
14  Пол, Фредерик
15  Твен, Марк
16  Пирс, Энтони
17  Саймак, Клиффорд Дональд
18  Силверберг, Роберт
19  Фостер, Алан Дин
20  Фрай, Макс
21  Херберт, Фрэнк
22  Честертон, Гилберт Кийт
23  Энтони, Марк
\.


--
-- TOC entry 7 (OID 69031)
-- Name: authors_id; Type: INDEX; Schema: public; Owner: lib
--

CREATE INDEX authors_id ON authors USING btree (id);


--
-- TOC entry 8 (OID 69032)
-- Name: authors_name; Type: INDEX; Schema: public; Owner: lib
--

CREATE INDEX authors_name ON authors USING btree (name);


--
-- TOC entry 6 (OID 69026)
-- Name: authors_id_seq; Type: SEQUENCE SET; Schema: public; Owner: lib
--

SELECT pg_catalog.setval('authors_id_seq', 23, true);


SET SESSION AUTHORIZATION 'pgsql';

--
-- TOC entry 3 (OID 2200)
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: pgsql
--

COMMENT ON SCHEMA public IS 'Standard public schema';


 id |   name   
+--
 10 | Кинг, Стивен
 11 | Кларк, Артур
 16 | Пирс, Энтони
 14 | Пол, Фредерик
 23 | Энтони, Марк
 19 | Фостер, Алан Дин
 20 | Фрай, Макс
 22 | Честертон, Гилберт Кийт
 13 | Желязны, Роджер
  6 | Гамильтон, Эдмонд
  7 | Гаррисон, Гарри
 12 | Лукьяненко, Сергей
 17 | Саймак, Клиффорд Дональд
 18 | Силверберг, Роберт
 15 | Твен, Марк
 21 | Херберт, Фрэнк
  1 | Андерсон, Пол
  2 | Азимов, Айзек
  3 | Асприн, Роберт
  5 | Брэдбери, Рей
  4 | Булгаков, Михаил
  8 | Даррелл, Джеральд
  9 | Дойл, Артур Конан
(23 rows)


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster