校验 [英] checksum
问题描述
我想知道PGSQL是否具有类似于
MS SQL Server 2000的binary_checksum()的功能。在比较行时它非常方便
数据而不是必须写长布尔表达式。
binary_checksum()获取字段列表并返回一个整数值
sumarize行内容。
谢谢,
美联储
-------------- -------------(广播结束)---------------------------
提示4:不要杀死-9''邮政局长
>我想知道PGSQL是否具有类似于MS SQL Server 2000的binary_checksum()的功能。在比较数据行而不是拥有数据时非常方便编写长布尔表达式。
binary_checksum()接受一个字段列表,它返回一个整数值
,它会对行内容进行优化。
在类似的说明中,我发现自己想要一个扩展的''=''运算符
意思是
(a = b或(a为null)和b是空的))
当然是相同的目标,进行更一般的比较...
d。
-
David Helgason,
商业发展等,
超越边缘I / S( http://otee.dk )
直线+45 2620 0663
主线+45 3264 5049
在2004年9月26日19:58,Federico Balbi写道:
----------- --------------- - (广播结束)---------------------------
提示3:如果通过Usenet发布/阅读,请发送适当的
subscribe-nomail命令到 ma ******* @ postgresql。 org 以便你的
消息可以干净地通过邮件列表
David Helgason写道:
我想知道PGSQL是否具有类似于MS / SQL Server 2000的binary_checksum()的功能。它非常方便它来比较数据行而不必写长布尔表达式。
binary_checksum()接受一个字段列表,它返回一个整数值
,它会对行内容进行优化。
您可以使用md5函数....例如:
从bar中选择md5(foo),其中baz = 2;
J
在类似的说明中,我发现自己已经一个扩展的''=''运算符
意思是
(a = b或(a为空,b为空))
同样的目标当然是更一般的比较......
d。
-
命令提示,Inc。,Mammoth PostgreSQL的主页 - S / ODBC和S / JDBC
Postgresql支持,编程共享主机和专用主机。
+ 1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt。 com
PostgreSQL Replicator - PostgreSQL的生产质量复制
-------------------- -------(播出结束)---------------------------
提示1:订阅和取消订阅命令转到 ma*******@postgresql.org
>
> David Helgason写道:我想知道PGSQL是否具有类似
binary_checksum()的功能
MS SQL Server 2000.在比较数据行而不必编写长布尔表达式时非常方便。
binary_checksum()接受一个字段列表并返回一个整数值
对行内容进行sumarize。
您可以使用md5函数....例如:
选择md5(foo)来自bar,其中baz = 2;
看起来md5()只接受一个字符串。我需要通过字段
代替。我正在查看文档,我想我可以写
类似于:
field1,field2,...,fieldn = expr1,expr2 ,. ..,exprn
这样一个操作员将检查所有字段是否相等。
美联储
- --------------------------(广播结束)------------------- --------
提示7:别忘了增加你的免费空间地图设置
Hi,
I was wondering if PGSQL has a function similar to binary_checksum() of
MS SQL Server 2000. It is pretty handy when it comes to compare rows of
data instead of having to write long boolean expressions.
binary_checksum() takes a list of fields and it returns an integer value
which sumarize the row content.
Thanks,
Fed
---------------------------(end of broadcast)---------------------------
TIP 4: Don''t ''kill -9'' the postmaster
> I was wondering if PGSQL has a function similar to binary_checksum()of
MS SQL Server 2000. It is pretty handy when it comes to compare rows of
data instead of having to write long boolean expressions.
binary_checksum() takes a list of fields and it returns an integer
value
which sumarize the row content.
On a similar note, I''ve found myself wanting an extended ''='' operator
meaning
(a = b or (a is null and b is null))
same goal of course, for more general comparisons...
d.
--
David Helgason,
Business Development et al.,
Over the Edge I/S (http://otee.dk)
Direct line +45 2620 0663
Main line +45 3264 5049
On 26. sep 2004, at 19:58, Federico Balbi wrote:
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly
David Helgason wrote:
I was wondering if PGSQL has a function similar to
binary_checksum() of
MS SQL Server 2000. It is pretty handy when it comes to compare rows of
data instead of having to write long boolean expressions.
binary_checksum() takes a list of fields and it returns an integer value
which sumarize the row content.
You could use the md5 function.... such as :
select md5(foo) from bar where baz = 2;
J
On a similar note, I''ve found myself wanting an extended ''='' operator
meaning
(a = b or (a is null and b is null))
same goal of course, for more general comparisons...
d.
--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org
> David Helgason wrote:I was wondering if PGSQL has a function similar to
binary_checksum() of
MS SQL Server 2000. It is pretty handy when it comes to compare rows of
data instead of having to write long boolean expressions.
binary_checksum() takes a list of fields and it returns an integer value
which sumarize the row content.
You could use the md5 function.... such as :
select md5(foo) from bar where baz = 2;
Looks like md5() takes only a string. I need to pass alist of fields
instead. I was looking at the documentattion and I think I can write
soemthing like:
field1, field2, ..., fieldn = expr1, expr2, ..., exprn
This way one operator will check all the fields for equality.
Fed
---------------------------(end of broadcast)---------------------------
TIP 7: don''t forget to increase your free space map settings
这篇关于校验的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!