mirror of
https://github.com/postgres/postgres.git
synced 2025-12-22 17:42:17 +03:00
the patch include:
- rename ichar() to chr() (discussed with Tom)
- add docs for oracle compatible routines:
btrim()
ascii()
chr()
repeat()
- fix bug with timezone in to_char()
- all to_char() variants return NULL instead textin("")
if it's needful.
The contrib/odbc is without changes and contains same routines as main
tree ... because I not sure how plans are Thomas with this :-)
Karel
---------------------------------------------------------------------------
This effectively one line patch should fix the fact that
foreign key definitions in create table were erroring if
a primary key was defined. I was using the columns
list to get the columns of the table for comparison, but
it got reused as a temporary list inside the primary key
stuff.
Stephan Szabo
This commit is contained in:
@@ -356,10 +356,16 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>to_ascii(text [,name|int])</entry>
|
||||
<entry>ascii(text)</entry>
|
||||
<entry>int</entry>
|
||||
<entry>returns the decimal representation of the first character from text</entry>
|
||||
<entry>ascii('x')</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>btrim(text,set)</entry>
|
||||
<entry>text</entry>
|
||||
<entry>convert text from multibyte encoding to ASCII</entry>
|
||||
<entry>to_ascii('Karel')</entry>
|
||||
<entry>both (left and right) trim characters from text</entry>
|
||||
<entry>btrim('xxxtrimxxx','x')</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>char(text)</entry>
|
||||
@@ -374,6 +380,12 @@
|
||||
<entry>char(varchar 'varchar string')</entry>
|
||||
</row>
|
||||
<row>
|
||||
<row>
|
||||
<entry>chr(int)</entry>
|
||||
<entry>text</entry>
|
||||
<entry>returns the character having the binary equivalent to int</entry>
|
||||
<entry>chr(65)</entry>
|
||||
</row>
|
||||
<entry>initcap(text)</entry>
|
||||
<entry>text</entry>
|
||||
<entry>first letter of each word to upper case</entry>
|
||||
@@ -392,10 +404,10 @@
|
||||
<entry>ltrim('xxxxtrim','x')</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>textpos(text,text)</entry>
|
||||
<entry>repeat(text,int)</entry>
|
||||
<entry>text</entry>
|
||||
<entry>locate specified substring</entry>
|
||||
<entry>position('high','ig')</entry>
|
||||
<entry>repeat text by int</entry>
|
||||
<entry>repeat('Pg', 4)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>rpad(text,int,text)</entry>
|
||||
@@ -427,12 +439,24 @@
|
||||
<entry>convert varchar to text type</entry>
|
||||
<entry>text(varchar 'varchar string')</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>textpos(text,text)</entry>
|
||||
<entry>text</entry>
|
||||
<entry>locate specified substring</entry>
|
||||
<entry>position('high','ig')</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>to_ascii(text [,name|int])</entry>
|
||||
<entry>text</entry>
|
||||
<entry>convert text from multibyte encoding to ASCII</entry>
|
||||
<entry>to_ascii('Karel')</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>translate(text,from,to)</entry>
|
||||
<entry>text</entry>
|
||||
<entry>convert character in string</entry>
|
||||
<entry>translate('12345', '1', 'a')</entry>
|
||||
</row>
|
||||
</row>
|
||||
<row>
|
||||
<entry>varchar(char)</entry>
|
||||
<entry>varchar</entry>
|
||||
|
||||
Reference in New Issue
Block a user