Going crazy comparing bytea columns

Поиск
Список
Период
Сортировка
От scomp@canada.com
Тема Going crazy comparing bytea columns
Дата
Msg-id 4405eaa7.238.999.19861@canada.com
обсуждение исходный текст
Ответы Re: Going crazy comparing bytea columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Going crazy comparing bytea columns  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Hi,
I am new to Postgresql, so pls be patient.

I am using npgsql with C# to insert a bytea value into a
column which will serve as an encrypted password. This works
well. However, when I retrieve the value, it is different.
In other words, "select pwd from table where pwd like @pwd"
does not work.

Is it not possible to compare bytea columns?

...get dbConn...

NpgsqlCommand cmd = new NpgsqlCommand("select pwd from table
where usr = @usr and pwd like @pwd",dbConn);
cmd.Parameters.Add(new NpgsqlParameter("usr",DbType.String);
cmd.Parameters.Add(new
NpgsqlParameter("pwd",NpgsqlTypes.NpgsqlDbType.Bytea);
cmd.prepare()
... set param values, call executereader...

Thanks,

JM


----------------------------------------
Upgrade your account today for increased storage; mail
forwarding or POP enabled e-mail with automatic virus
scanning. Visit our member benefits page at
https://members.canada.com/benefits.aspx for more
information.

В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Special offer with a possible dontation to the
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: a web framework for postgresql?