问题描述
您好,
由于我正处于从mysql到pg的迁移过程中,我发现
没有在mysql中可用的CONCAT函数。可以
有人告诉我如何用plPERL或plPGSQL
语言实现这个功能吗?
祝福,
ML
---------------------------(播出结束) - --------------------------
提示5:您查看了我们广泛的常见问题解答吗?
Hello,
As I''m in the middle of the migration process form mysql to pg I found
that there is no CONCAT function which is available in mysql. Can
anybody tell me how to implement this function using plPERL or plPGSQL
language ?
Best wishes,
ML
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
推荐答案
你想用||运算符,例如''你好''|| ''''|| ''world''
运营商和函数的完整详细信息可以在文档的数据类型
部分找到。
-
Richard Huxton
Archonet Ltd
-------- -------------------(广播结束)-------------------------- -
提示4:不要杀死-9''邮政局长
You want to use the || operator, e.g. ''hello'' || '' '' || ''world''
Full details of operators and functions can be found in the "data types"
section of the documentation.
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 4: Don''t ''kill -9'' the postmaster
我知道,但在我的应用程序中(现在正在使用MySQL)我
有很多查询使用CONCAT函数,所以我需要实现这个
函数是PG - 没有可能替换(在很短的时间内)所有
的查询。
---------------------------(播出结束)------ ---------------------
提示5:您查看了我们广泛的常见问题解答吗?
http://www.postgresql.org/docs/faqs/FAQ.html
I know that, but in my application (which is working on MySQL now) I
have many querys which use CONCAT function, so I need to implement this
function is PG - there is no possibility to replace (in short time) all
of my querys.
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
我知道,但在我的应用程序中(现在正在使用MySQL)我有很多查询使用CONCAT功能,所以我需要实现这个功能是PG - 没有可能替换(在很短的时间内)所有我的查询。
I know that, but in my application (which is working on MySQL now) I
have many querys which use CONCAT function, so I need to implement this
function is PG - there is no possibility to replace (in short time) all
of my querys.
编写你自己的功能..
类似
text concat(text,text)
return text1 | | text2
检查语法,但你有了想法..
再见
Shridhar
-
朋友,n。:借书和戴上湿眼镜的人。人们
谁也很了解你,但无论如何都喜欢你。
----------------------- ----(广播结束)---------------------------
提示2:你可以得到使用取消注册命令立即关闭所有列表
(发送取消注册YourEmailAddressHere到)
Write your own function..
something like
text concat(text,text)
return text1 || text2
Check up the syntax but you got the idea..
Bye
Shridhar
--
Friends, n.:People who borrow your books and set wet glasses on them.People
who know you well, but like you anyway.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)
这篇关于CONCAT功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!