cogdmif.ini 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930
  1. ;***********************************************************************
  2. ;Licensed Materials - Property of IBM
  3. ;
  4. ;BI and PM: UDA
  5. ;
  6. ;(C) Copyright IBM Corp. 2005, 2020
  7. ;
  8. ;U.S. Government Users Restricted Rights - Use, duplication, or disclosure
  9. ;by GSA ADP Schedule Contract with IBM Corp.
  10. ;
  11. ;Unless specifically authorized by IBM, you may not modify any part of this
  12. ;file. Where modification is authorized, you must reproduce any copyright
  13. ;notices contained in this file and specifically identify which
  14. ;modifications have been made by your organization. YOU ARE SOLELY
  15. ;RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF ANY MODIFICATIONS TO
  16. ;THIS FILE AND ASSUME ALL RISKS ASSOCIATED WITH THE USE AND DISTRIBUTION
  17. ;OF THE MODIFIED FILE. IBM will not provide support relating to
  18. ;unauthorized changes you make to this file.
  19. ;***********************************************************************
  20. ; $Header: //uda/main/prod/dmd/sgi/informix/cogdmif.ini#6 $
  21. ;
  22. ; Module:
  23. ; cogdmif.ini
  24. ;
  25. ; Purpose:
  26. ; This module contains the Informix gateway information.
  27. ;
  28. ; Notes:
  29. ; 1) Do NOT modify this file. Doing so could result in unknown behavior
  30. ; by the Informix gateway, possibly resulting in application aborts.
  31. ;
  32. ; 2) Informix does not support a function for performing the substring
  33. ; function; it uses array indexing of the form
  34. ; <column>[ <startIndex> {,<numChars>} ]
  35. ; If <numChars> is not specified, then only 1 character is extracted.
  36. ; The function 'ARRAY_SUBSTR' is not really an Informix function but
  37. ; a special function name indicating that the above array indexing
  38. ; is to be used.
  39. ; The following is the mapping applied by our interface for ARRAY_SUBSTR
  40. ; ARRAY_SUBSTR( %1, %2 {, %3} )
  41. ; maps to
  42. ; %1[ %2 {, %3} ]
  43. ;
  44. ; 3) The following are valid entry format:
  45. ; - [section name]:default values for both Informix Dynamic Server
  46. ; and Informix Extended Parallel Server
  47. ; - [section name Database:IDS]: default values for Informix Dynamic Server
  48. ; - [section name Database:XPS]; default values for Informix Extended
  49. ; Parallel Server
  50. ; - [section name Database:IDS/XPS 'version']: default values for either
  51. ; IDS or XPS and specific version.
  52. ;
  53. ; ************************************************************************
  54. [Expression Results]
  55. [Exceptions Commands]
  56. Call="EXECUTE PROCEDURE "
  57. [Exceptions Clauses]
  58. [Exceptions Tables]
  59. UniqueName_Prefix="coguda"
  60. SQL_MAX_TABLE_NAME_LEN="128"
  61. [Exceptions Tables Database:IDS INFORMIX7.31]
  62. SQL_MAX_TABLE_NAME_LEN="18"
  63. [Exceptions Tables Database:IDS]
  64. Derived=T
  65. Joined=T
  66. [Exceptions Tables Database:IDS INFORMIX10.00]
  67. Derived=F
  68. [Exceptions Tables Database:IDS INFORMIX9.40]
  69. Derived=F
  70. [Exceptions Tables Database:IDS INFORMIX9.14]
  71. Derived=F
  72. [Exceptions Tables Database:IDS INFORMIX7.31]
  73. Derived=F
  74. [Exceptions Tables Database:XPS]
  75. ; Turn off derived table due to trakker bugs 523528, 523677
  76. Derived=F
  77. Joined=F
  78. [Exceptions Tables Database:XPS INFORMIX8.40]
  79. ; Trakker 438973 uncovered a third-party issue with multi-level nestings
  80. ; of derived tables, so until this issue is fixed, we cannot push derived
  81. ; tables to the database.
  82. Derived=F
  83. [Exceptions Joins]
  84. Inner=T
  85. Left_Outer=T
  86. Right_Outer=T
  87. Full_Outer=T
  88. Cross=F
  89. Nested_Outer=T
  90. Nested_Inner_To_Product=F
  91. Left_Nested=T
  92. Right_Nested=T
  93. Inner_Tbl_Restrict=F
  94. Outer_Syntax=T
  95. Outer_Tbl_List=T
  96. Non_Equi_Joins=T
  97. Right_Pre="OUTER("
  98. Right_Eql="="
  99. Right_Post=")"
  100. Optnl_Tbl_Join_Filter=T
  101. ;
  102. ; Allowed: (1) IN, EXISTS, ALL/ANY/SOME subqueries
  103. ; (2) Subquery that returns only one value
  104. ;
  105. On_Condition_Subqueries=T
  106. On_Condition_Not_Predicate=T
  107. On_Condition_In_Predicate=T
  108. On_Condition_Between_Predicate=T
  109. On_Condition_Like_Predicate=T
  110. On_Condition_IsNull_Predicate=T
  111. On_Condition_Or_Predicate=T
  112. [Exceptions Joins Database:IDS]
  113. Right_Outer=F
  114. Left_Eql=" LEFT OUTER JOIN "
  115. Optnl_Tbl_Restrict=F
  116. Two_Sided_Join_Restrict=F
  117. Two_Sided_Join_Restrict_Filter=F
  118. Optnl_Tbl_Join_Restrict=F
  119. Optnl_Tbl_Filter=T
  120. Prsrv_Tbl_Join_Filter=T
  121. [Exceptions Joins Database:XPS]
  122. Inner=F
  123. Full_Outer=F
  124. Left_Pre="OUTER("
  125. Left_Eql="="
  126. Left_Post=")"
  127. Optnl_Tbl_Restrict=T
  128. Two_Sided_Join_Restrict=T
  129. Two_Sided_Join_Restrict_Filter=T
  130. Optnl_Tbl_Join_Restrict=T
  131. Optnl_Tbl_Filter=F
  132. Prsrv_Tbl_Join_Filter=F
  133. [Exceptions Joins Database:IDS INFORMIX11.70]
  134. Full_Outer=F
  135. [Exceptions Joins Database:IDS INFORMIX11.50]
  136. Full_Outer=F
  137. [Exceptions Joins Database:IDS INFORMIX7.31]
  138. Inner=F
  139. [Exceptions Joins Database:IDS INFORMIX9.14]
  140. Inner=F
  141. [Exceptions Predicates]
  142. Unique=
  143. ;Exists=
  144. [Exceptions Aggregates]
  145. Max="max"
  146. Min="min"
  147. Sum="sum"
  148. Avg="avg"
  149. Count="count"
  150. Count_Star="count(*)"
  151. Stddev="stdev"
  152. Variance="variance"
  153. [Exceptions OLAP Functions Database:IDS]
  154. Olap_Max="max"
  155. Olap_Min="min"
  156. Olap_Sum="sum"
  157. Olap_Avg="avg"
  158. Olap_Count="count"
  159. Olap_Count_Star="count(*)"
  160. Olap_Cume_Dist="cume_dist"
  161. Olap_Ntile="ntile"
  162. Olap_Rank="rank"
  163. Olap_Dense_Rank="dense_rank"
  164. Olap_Percent_Rank="percent_rank"
  165. Olap_Ratio_To_Report="ratio_to_report"
  166. Olap_Row_Number="row_number"
  167. Olap_First_Value="first_value"
  168. Olap_Last_Value="last_value"
  169. ;Olap_Count_Default="ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING"
  170. ;Olap_Sum_Default="ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING"
  171. ;Olap_Avg_Default="ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING"
  172. Olap_Last_Value_Default="ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING"
  173. [Exceptions OLAP Functions Database:IDS INFORMIX11.70]
  174. Olap_Max=
  175. Olap_Min=
  176. Olap_Sum=
  177. Olap_Avg=
  178. Olap_Count=
  179. Olap_Count_Star=
  180. Olap_Cume_Dist=
  181. Olap_Ntile=
  182. Olap_Rank=
  183. Olap_Dense_Rank=
  184. Olap_Percent_Rank=
  185. Olap_Ratio_To_Report=
  186. Olap_Row_Number=
  187. Olap_First_Value=
  188. Olap_Last_Value=
  189. [Exceptions OLAP Functions Database:IDS INFORMIX11.50]
  190. Olap_Max=
  191. Olap_Min=
  192. Olap_Sum=
  193. Olap_Avg=
  194. Olap_Count=
  195. Olap_Count_Star=
  196. Olap_Cume_Dist=
  197. Olap_Ntile=
  198. Olap_Rank=
  199. Olap_Dense_Rank=
  200. Olap_Percent_Rank=
  201. Olap_Ratio_To_Report=
  202. Olap_Row_Number=
  203. Olap_First_Value=
  204. Olap_Last_Value=
  205. [Exceptions OLAP Functions Database:IDS INFORMIX10.00]
  206. Olap_Max=
  207. Olap_Min=
  208. Olap_Sum=
  209. Olap_Avg=
  210. Olap_Count=
  211. Olap_Count_Star=
  212. Olap_Cume_Dist=
  213. Olap_Ntile=
  214. Olap_Rank=
  215. Olap_Dense_Rank=
  216. Olap_Percent_Rank=
  217. Olap_Ratio_To_Report=
  218. Olap_Row_Number=
  219. Olap_First_Value=
  220. Olap_Last_Value=
  221. [Exceptions OLAP Functions Database:IDS INFORMIX9.40]
  222. Olap_Max=
  223. Olap_Min=
  224. Olap_Sum=
  225. Olap_Avg=
  226. Olap_Count=
  227. Olap_Count_Star=
  228. Olap_Cume_Dist=
  229. Olap_Ntile=
  230. Olap_Rank=
  231. Olap_Dense_Rank=
  232. Olap_Percent_Rank=
  233. Olap_Ratio_To_Report=
  234. Olap_Row_Number=
  235. Olap_First_Value=
  236. Olap_Last_Value=
  237. [Exceptions OLAP Functions Database:XPS]
  238. Olap_Max=
  239. Olap_Min=
  240. Olap_Sum=
  241. Olap_Avg=
  242. Olap_Count=
  243. Olap_Count_Star=
  244. Olap_Cume_Dist=
  245. Olap_Ntile=
  246. Olap_Rank=
  247. Olap_Dense_Rank=
  248. Olap_Percent_Rank=
  249. Olap_Ratio_To_Report=
  250. Olap_Row_Number=
  251. Olap_First_Value=
  252. Olap_Last_Value=
  253. [Exceptions Set Operators Database:IDS]
  254. Distinct="distinct"
  255. ; turn off union and union all operator due to Informix bug described in
  256. ; Trakker #400422 and IBM PMR 77287,004. IBM returns the wrong NULLABLE value
  257. ; of the output columns in a union clause.
  258. ; Against Informix 12.10 beta server sql9179, sql9180 and sql 9197 has issue with null indicator flag, hence the result return -big number.
  259. Union="union"
  260. ;Union_All=T
  261. Intersect="intersect"
  262. Except=" except "
  263. [Exceptions Set Operators Database:IDS INFORMIX11.70]
  264. ; turn off union and union all operator due to Informix bug described in
  265. ; Trakker #400422 and IBM PMR 77287,004. IBM returns the wrong NULLABLE value
  266. ; of the output columns in a union clause.
  267. Union=
  268. Union_All=F
  269. Intersect=
  270. Except=
  271. [Exceptions Set Operators Database:IDS INFORMIX10.00]
  272. ; turn off union and union all operator due to Informix bug described in
  273. ; Trakker #400422 and IBM PMR 77287,004. IBM returns the wrong NULLABLE value
  274. ; of the output columns in a union clause.
  275. Union=
  276. Union_All=F
  277. Intersect=
  278. Except=
  279. [Exceptions Set Operators Database:IDS INFORMIX9.40]
  280. ; turn off union and union all operator due to Informix bug described in
  281. ; Trakker #400422 and IBM PMR 77287,004. IBM returns the wrong NULLABLE value
  282. ; of the output columns in a union clause.
  283. Union=
  284. Union_All=F
  285. Intersect=
  286. Except=
  287. [Exceptions Set Operators Database:XPS]
  288. ; turn off union and union all operator due to Informix bug described in
  289. ; Trakker #400422 and IBM PMR 77287,004. IBM returns the wrong NULLABLE value
  290. ; of the output columns in a union clause.
  291. Union=
  292. Union_All=F
  293. Intersect=
  294. Except=
  295. [Exceptions Operators]
  296. Neq=" <> "
  297. [Exceptions Value Expressions]
  298. Octet_Length=T
  299. Char_Length=T
  300. StrCat=T
  301. Substring=T
  302. Trim=T
  303. Extract=C
  304. Current_Time=F
  305. Current_Timestamp=F
  306. LocalTime=C
  307. LocalTimestamp=C
  308. Abs=T
  309. Mod=T
  310. Ln=T
  311. Exp=T
  312. Power=C
  313. Sqrt=T
  314. Floor=C
  315. Nullif=T
  316. Upper=T
  317. Lower=T
  318. Case_Searched=T
  319. ;
  320. ; Extract=C, above, indicates that SQL'92 EXTRACT functionality
  321. ; is [partially] supported by the Informix Gateway through the use
  322. ; of the following function maps. The entries without corresponding
  323. ; function names are simulated locally.
  324. ; ie) 'EXTRACT( YEAR FROM <dateColumn> )' can be supported by the
  325. ; 'if_year( <dateColumn> )' function described in the
  326. ; Database Functions section.
  327. ;
  328. Extract_Year=coguda#extract_year
  329. Extract_Month=coguda#extract_month
  330. Extract_Day=coguda#extract_day
  331. ; Informix day only accepts date/datetime expression. Cognos SQL
  332. ; extract_day accepts interval in addition to date/datetime expression.
  333. ; Extract_Hours=
  334. ; Extract_Minutes=
  335. ; Extract_Seconds=
  336. Case_Simple=T
  337. Current_Date=C
  338. Cast=C
  339. [Exceptions Value Expressions Database:IDS INFORMIX11.70]
  340. Ln=C
  341. Nullif=F
  342. [Exceptions Value Expressions Database:IDS INFORMIX11.50]
  343. Ln=C
  344. Nullif=F
  345. [Exceptions Value Expressions Database:IDS INFORMIX10.00]
  346. Ln=C
  347. [Exceptions Value Expressions Database:IDS INFORMIX9.40]
  348. Ln=C
  349. [Exceptions Value Expressions Database:IDS INFORMIX7.31]
  350. Cast=F
  351. [Exceptions Value Expressions Database:XPS]
  352. Case_Simple=F
  353. Current_Date=F
  354. Cast=F
  355. Ln=C
  356. Nullif=F
  357. [Exceptions General]
  358. Aggregate_Value_Expr=T
  359. Aggregate_In_Expr=T
  360. Boolean_Comparison=F
  361. Count_Non_Distinct=T
  362. Count_Value_Expr=T
  363. Multiple_Distinct=T
  364. Distinct_Aggregates=T
  365. Group_By_Ordinal=T
  366. Nulls_Sort_Last=F
  367. Subqueries=T
  368. Subquery_Column_Alias=T
  369. Like_Value_Expr=T
  370. Group_By_Expr=F
  371. Subquery_In_Group_By=F
  372. Subquery_In_Aggregate=T
  373. Count_Blob=F
  374. ; Informix does not support order by alias/name with union clause
  375. Order_By_Alias=F
  376. Order_By_Name=F
  377. Group_By_Sorted=F
  378. Like_With_Escape=T
  379. Integer_Division_Truncation=F
  380. Is_Null_Value_Expr=T
  381. Is_Null_Value_Parm=T
  382. [Exceptions General Database:IDS]
  383. Correlated_Subqueries=T
  384. Is_Null_Value_Parm=F
  385. [Exceptions General Database:IDS INFORMIX11.70]
  386. Count_Value_Expr=F
  387. Multiple_Distinct=F
  388. [Exceptions General Database:IDS INFORMIX11.50]
  389. Count_Value_Expr=F
  390. Multiple_Distinct=F
  391. [Exceptions General Database:IDS INFORMIX11.10]
  392. Is_Null_Value_Expr=F
  393. [Exceptions General Database:IDS INFORMIX10.00]
  394. Is_Null_Value_Expr=F
  395. [Exceptions General Database:IDS INFORMIX9.40]
  396. Is_Null_Value_Expr=F
  397. [Exceptions General Database:IDS INFORMIX9.14]
  398. Is_Null_Value_Expr=F
  399. [Exceptions General Database:IDS INFORMIX7.31]
  400. Is_Null_Value_Expr=F
  401. [Exceptions General Database:XPS]
  402. Correlated_Subqueries=F
  403. Count_Value_Expr=F
  404. [Exceptions General Database:XPS INFORMIX8.20]
  405. Correlated_Subqueries=T
  406. Count_Non_Distinct=F
  407. Is_Null_Value_Parm=F
  408. [Exceptions General Database:XPS INFORMIX8.30]
  409. Correlated_Subqueries=T
  410. Is_Null_Value_Parm=F
  411. [Exceptions Literals]
  412. True_Literal_Str="T"
  413. False_Literal_Str="F"
  414. Unknown_Literal_Str=
  415. Date_Literal=C
  416. Date_Format_Str="YYYY MM DD"
  417. Date_Literal_Str="DATE(DATETIME( %s-%s-%s ) YEAR TO DAY)"
  418. Timestamp_Literal=C
  419. Timestamp_Format_Str="YYYY MM DD HH MM SS FFFFF"
  420. Timestamp_Literal_Str="DATETIME( %s-%s-%s %s:%s:%s.%s ) YEAR TO FRACTION(5)"
  421. TimestampTZ_Literal=F
  422. TimestampTZ_Format_Str=
  423. TimestampTZ_Literal_Str=
  424. Time_Literal=C
  425. Time_Format_Str="HH MM SS FFFFF"
  426. Time_Literal_Str="DATETIME( %s:%s:%s.%s ) HOUR TO FRACTION(5)"
  427. TimeTZ_Literal=F
  428. TimeTZ_Format_Str=
  429. TimeTZ_Literal_Str=
  430. Interval_Literal=F
  431. Interval_Format_Str="DD HH MM SS FFFFF"
  432. Interval_Literal_Str="INTERVAL( %s %s:%s:%s.%s ) DAY(9) TO FRACTION(5)"
  433. IntervalYM_Literal=F
  434. IntervalYM_Format_Str="YYYYYYYYY MM"
  435. IntervalYM_Literal_Str="INTERVAL( %s-%s ) YEAR(9) TO MONTH"
  436. Date_Add_Function_Str="( EXTEND(?1, YEAR TO FRACTION) + ?2 )"
  437. Date_Sub_Function_Str="( EXTEND(?1, YEAR TO FRACTION) - ?2 )"
  438. NChar_Literal=T
  439. [Exceptions Literals Database:IDS]
  440. Boolean_Literal=T
  441. [Exceptions Literals Database:IDS INFORMIX7.31]
  442. Boolean_Literal=F
  443. [Exceptions Literals Database:XPS]
  444. Boolean_Literal=F
  445. [Exceptions Delimiters]
  446. Catalog_Delimiter=
  447. Schema_Delimiter="'"
  448. Table_Delimiter=
  449. Column_Delimiter=
  450. Procedure_Delimiter=
  451. Wholename_Delimiter=
  452. [Exceptions Separators]
  453. Catalog_Separator=":"
  454. Schema_Separator="."
  455. Table_Separator="."
  456. [Exceptions Misc]
  457. Session_Sort_Order=T
  458. [Builtin Functions]
  459. d:date(%1dcs)=DATE(%1);
  460. n:ln(%1n)=LN(%1);
  461. n:power(%1n,%2n)=POW(%1,%2);
  462. n:floor(%1n)=TRUNC(%1,0);
  463. n:absolute(%1n)=ABS(%1);
  464. c:upshift(%1c)=UPPER(%1);
  465. c:downshift(%1c)=LOWER(%1);
  466. n:round(%1n,%2n)=round(%1,%2);
  467. ; CAST Functions
  468. ;
  469. n:coguda#cast_bigint(%1cn)=CAST(%1 AS INT8);
  470. n:coguda#cast_float(%1cn)=CAST(%1 AS REAL);
  471. n:coguda#cast_real(%1cn)=CAST(%1 AS REAL);
  472. n:coguda#cast_double_precision(%1cn {,%2n})=CAST(%1 AS DOUBLE PRECISION{(%2)});
  473. d:coguda#cast_date(%1c)=CAST( TO_DATE(%1, '%Y-%m-%d') AS DATE );
  474. d:coguda#cast_date(%1ds)=CAST( %1 AS DATE );
  475. t:coguda#cast_time(%1)=CAST(%1 AS DATETIME HOUR TO FRACTION(3));
  476. s:coguda#cast_timestamp(%1cnds)=CAST(%1 AS DATETIME YEAR TO FRACTION(3));
  477. i:coguda#cast_interval(%1cni)=CAST(%1 AS INTERVAL DAY(9) TO FRACTION(3));
  478. i:coguda#cast_interval_year(%1)=CAST(%1 AS INTERVAL YEAR(9) TO YEAR);
  479. i:coguda#cast_interval_year_to_month(%1)=CAST(%1 AS INTERVAL YEAR(9) TO MONTH);
  480. i:coguda#cast_interval_month(%1)=CAST(%1 AS INTERVAL MONTH(9) TO MONTH);
  481. i:coguda#cast_interval_day(%1)=CAST(%1 AS INTERVAL DAY(9) TO DAY);
  482. i:coguda#cast_interval_day_to_hour(%1)=CAST(%1 AS INTERVAL DAY(9) TO HOUR);
  483. i:coguda#cast_interval_day_to_minute(%1)=CAST(%1 AS INTERVAL DAY(9) TO MINUTE);
  484. i:coguda#cast_interval_day_to_second(%1)=CAST(%1 AS INTERVAL DAY(9) TO FRACTION(3));
  485. i:coguda#cast_interval_hour(%1)=CAST(%1 AS INTERVAL HOUR(9) TO HOUR);
  486. i:coguda#cast_interval_hour_to_minute(%1)=CAST(%1 AS INTERVAL HOUR(9) TO MINUTE);
  487. i:coguda#cast_interval_hour_to_second(%1)=CAST(%1 AS INTERVAL HOUR(9) TO FRACTION(3));
  488. i:coguda#cast_interval_minute(%1)=CAST(%1 AS INTERVAL MINUTE(9) TO MINUTE);
  489. i:coguda#cast_interval_minute_to_second(%1)=CAST(%1 AS INTERVAL MINUTE(9) TO FRACTION(3));
  490. i:coguda#cast_interval_second(%1)=CAST(%1 AS INTERVAL SECOND(9) TO FRACTION(3));
  491. c:coguda#cast_char(%1b {,%2n})=CASE %1 WHEN 'T' THEN CAST('TRUE' AS CHAR{(%2)}) WHEN 'F' THEN CAST('FALSE' AS CHAR{(%2)}) END;
  492. c:coguda#cast_char(%1ndtsic {,%2n})=CAST(%1 AS CHAR{(%2)});
  493. c:coguda#cast_varchar(%1b {,%2n})=CASE %1 WHEN 'T' THEN CAST('TRUE' AS VARCHAR{(%2)}) WHEN 'F' THEN CAST('FALSE' AS VARCHAR{(%2)}) END;
  494. c:coguda#cast_varchar(%1ndtsic {,%2n})=CAST(%1 AS VARCHAR{(%2)});
  495. c:coguda#cast_nchar(%1b {,%2n})=CASE %1 WHEN 'T' THEN CAST('TRUE' AS NCHAR{(%2)}) WHEN 'F' THEN CAST('FALSE' AS NCHAR{(%2)}) END;
  496. c:coguda#cast_nchar(%1ndtsic {,%2n})=CAST(%1 AS NCHAR{(%2)});
  497. c:coguda#cast_varchar(%1b {,%2n})=CASE %1 WHEN 'T' THEN CAST('TRUE' AS NVARCHAR{(%2)}) WHEN 'F' THEN CAST('FALSE' AS NVARCHAR{(%2)}) END;
  498. c:coguda#cast_nvarchar(%1ndtsic {,%2n})=CAST(%1 AS NVARCHAR{(%2)});
  499. ;Functions required to cast division of integer/numeric to a floating point
  500. n:coguda#cast_division_float(%1cn)=CAST(%1 AS REAL);
  501. n:coguda#cast_division_double_precision(%1cn {,%2n})=CAST(%1 AS DOUBLE PRECISION{(%2)});
  502. ;
  503. ; Business Functions for Date Calculations
  504. ;
  505. s:_add_days(%1s,%2n)=((%1) + (%2) UNITS DAY);
  506. d:_add_days(%1d,%2n)=((%1) + (%2) UNITS DAY);
  507. n:_days_between(%1ds,%2ds)=( %1 - %2 );
  508. n:_months_between(%1ds,%2ds)=;
  509. n:_years_between(%1ds,%2ds)=;
  510. n:_days_to_end_of_month(%1ds)=( DAY(( ( %1 - DAY( %1 ) UNITS DAY + 1 UNITS DAY ) + 1 UNITS MONTH - 1 UNITS DAY )) - DAY(%1) );
  511. n:_age(%1d)=;
  512. d:_first_of_month(%1d)=(%1 - DAY(%1) UNITS DAY + 1 UNITS DAY);
  513. s:_first_of_month(%1s)=(%1 - DAY(%1) UNITS DAY + 1 UNITS DAY);
  514. d:_last_of_month(%1d)=((%1 - DAY(%1) UNITS DAY + 1 UNITS DAY) + 1 UNITS MONTH - 1 UNITS DAY);
  515. s:_last_of_month(%1s)=((%1 - DAY(%1) UNITS DAY + 1 UNITS DAY) + 1 UNITS MONTH - 1 UNITS DAY);
  516. s:_make_timestamp(%1n,%2n,%3n)=EXTEND( MDY( %2 , %3 , %1 ) );
  517. n:_ymdint_between(%1ds,%2ds)=;
  518. n:_week_of_year(%1ds)=;
  519. n:_day_of_week(%1ds, %2n)=(MOD( WEEKDAY( %1 ) - %2 + 7, 7 ) + 1);
  520. n:_round(%1n,%2n)=ROUND(%1,%2);
  521. ;
  522. ; Additional Business Functions for Date Calculations
  523. ;
  524. s:_add_hours(%1s,%2n)=(%1 + %2 UNITS HOUR);
  525. t:_add_hours(%1t,%2n)=(%1 + %2 UNITS HOUR);
  526. s:_add_minutes(%1s,%2n)=(%1 + %2 UNITS MINUTE);
  527. t:_add_minutes(%1t,%2n)=(%1 + %2 UNITS MINUTE);
  528. s:_add_seconds(%1s,%2n)=(%1 + %2 UNITS SECOND);
  529. t:_add_seconds(%1t,%2n)=(%1 + %2 UNITS SECOND);
  530. n:_hours_between(%1ds,%2ds)=;
  531. n:_minutes_between(%1ds,%2ds)=;
  532. n:_seconds_between(%1ds,%2ds)=;
  533. ;
  534. ; Functions required by EXTRACT.
  535. ;
  536. n:coguda#extract_year(%1ds)=YEAR(%1);
  537. n:coguda#extract_month(%1ds)=MONTH(%1);
  538. n:coguda#extract_day(%1ds)=DAY(%1);
  539. n:coguda#extract_hour(%1)=;
  540. n:coguda#extract_minute(%1)=;
  541. n:coguda#extract_second(%1)=;
  542. [Builtin Functions Database:IDS]
  543. d:_add_months(%1d,%2n)=CASE WHEN DAY((MDY(MONTH(%1), 1, YEAR(%1)) + (%2) UNITS MONTH) + 1 UNITS MONTH - 1 UNITS DAY ) < DAY(%1) then ((%1 - DAY(%1) UNITS DAY + 1 UNITS DAY) + (%2) UNITS MONTH) + 1 UNITS MONTH - 1 UNITS DAY else %1 + (%2) UNITS MONTH END;
  544. s:_add_months(%1s,%2n)=CASE WHEN DAY((MDY(MONTH(%1), 1, YEAR(%1)) + (%2) UNITS MONTH) + 1 UNITS MONTH - 1 UNITS DAY ) < DAY(%1) then ((%1 - DAY(%1) UNITS DAY + 1 UNITS DAY) + (%2) UNITS MONTH) + 1 UNITS MONTH - 1 UNITS DAY else %1 + (%2) UNITS MONTH END;
  545. d:_add_years(%1d,%2n)=CASE WHEN MONTH(%1) = 2 AND DAY(%1) = 29 AND NOT MOD( %2, 4 ) = 0 THEN MDY(2, 28, YEAR(%1) + (%2)) ELSE MDY(MONTH(%1), DAY(%1), YEAR(%1) + (%2)) END;
  546. s:_add_years(%1s,%2n)=CASE WHEN MONTH(%1) = 2 AND DAY(%1) = 29 AND NOT MOD( %2, 4 ) = 0 THEN (((%1) - DAY(%1) UNITS DAY) + 1 UNITS DAY) + (%2) UNITS YEAR + 1 UNITS MONTH - 1 UNITS DAY else (%1) + (%2) UNITS YEAR END;
  547. n:_day_of_year(%1ds)=CAST( CAST( EXTEND( %1, YEAR TO DAY ) + 1 UNITS DAY - EXTEND( %1, YEAR TO YEAR) AS CHAR(10) ) AS INTEGER );
  548. [Builtin Functions Database:IDS INFORMIX11.70]
  549. n:ln(%1n)=LOGN(%1);
  550. [Builtin Functions Database:IDS INFORMIX11.50]
  551. n:ln(%1n)=LOGN(%1);
  552. [Builtin Functions Database:IDS INFORMIX10.00]
  553. n:ln(%1n)=LOGN(%1);
  554. [Builtin Functions Database:IDS INFORMIX9.40]
  555. n:ln(%1n)=LOGN(%1);
  556. [Builtin Functions Database:IDS INFORMIX7.31]
  557. ds:_add_months(%1ds,%2n)=;
  558. ds:_add_months(%1ds,%2n)=;
  559. ds:_add_years(%1ds,%2n)=;
  560. n:_day_of_year(%1ds)=;
  561. s:_add_hours(%1s,%2n)=;
  562. t:_add_hours(%1t,%2n)=;
  563. s:_add_minutes(%1s,%2n)=;
  564. t:_add_minutes(%1t,%2n)=;
  565. s:_add_seconds(%1s,%2n)=;
  566. t:_add_seconds(%1t,%2n)=;
  567. [Builtin Functions Database:XPS]
  568. ds:_add_months(%1ds,%2n)=;
  569. ds:_add_years(%1ds,%2n)=;
  570. n:_day_of_year(%1ds)=;
  571. s:_add_hours(%1s,%2n)=;
  572. t:_add_hours(%1t,%2n)=;
  573. s:_add_minutes(%1s,%2n)=;
  574. t:_add_minutes(%1t,%2n)=;
  575. s:_add_seconds(%1s,%2n)=;
  576. t:_add_seconds(%1t,%2n)=;
  577. n:ln(%1n)=LOGN(%1);
  578. [Database Functions]
  579. n:stddev_pop(%1n)=STDEV(%1);
  580. n:var_pop(%1n)=VARIANCE(%1);
  581. n:power(%1n,%2n)=POW(%1,%2);
  582. n:sqrt(%1n)=SQRT(%1);
  583. d:current_date()=TODAY;
  584. t:localtime()=CURRENT HOUR TO FRACTION;
  585. t:localtime(%1n)=CURRENT HOUR TO FRACTION(%1);
  586. s:localtimestamp({%1n})=CURRENT;
  587. c:dbservername()=DBSERVERNAME;
  588. s:if_current()=CURRENT;
  589. d:if_date(%1cns)=DATE(%1);
  590. s:if_datetime(%1cn, %2c)=DATETIME(%1) %2;
  591. n:if_day(%1ds)=DAY(%1);
  592. i:if_interval(%1cn, %2c)=INTERVAL(%1) %2;
  593. n:if_length(%1c)=LENGTH(%1);
  594. n:if_month(%1ds)=MONTH(%1);
  595. n:if_round(%1n {, %2n})=ROUND(%1 {, %2});
  596. i:if_units(%1n, %2c)=(%1) UNITS %2;
  597. c:if_user()=USER;
  598. n:if_year(%1ds)=YEAR(%1);
  599. c:sitename()=SITENAME;
  600. d:today()=TODAY;
  601. ;
  602. ; if_substring( <columnName>, <startCol> {, <endCol>} )
  603. ; INFORMIX supports array subscripting on column names. 'if_subtring'
  604. ; provides a mapping to this syntax. You specify the starting offset
  605. ; and the ending offset within the character column. Offsets must be
  606. ; one-based numeric literals. Specifying only <startCol> extracts a
  607. ; single character.
  608. ;
  609. c:if_substring(%1c,%2n{,%3n})=ARRAY_SUBSTR(%1,%2{,%3});
  610. ;
  611. ; If running with Informix servers before 7.1, the following function mapping
  612. ; must be commented out:
  613. ; absolute,
  614. ; if_cos, if_sin, if_tan, if_acos, if_asin, if_atan, if_atan2,
  615. ; if_exp, if_logn, if_log10,
  616. ; if_dbinfo
  617. ; if_trim_both, if_trim_leading, if_trim_trailing
  618. ; truncate
  619. ;
  620. n:if_cos(%1n)=COS(%1);
  621. n:if_sin(%1n)=SIN(%1);
  622. n:if_tan(%1n)=TAN(%1);
  623. n:if_acos(%1n)=ACOS(%1);
  624. n:if_asin(%1n)=ASIN(%1);
  625. n:if_atan(%1n)=ATAN(%1);
  626. n:if_atan2(%1n, %2n)=ATAN2(%1, %2);
  627. n:if_exp(%1n)=EXP(%1);
  628. n:if_logn(%1n)=LOGN(%1);
  629. n:if_log10(%1n)=LOG10(%1);
  630. ;
  631. ; Informix dbinfo function is actually a set of functions that return
  632. ; different types of information about the database. Depends on the option
  633. ; and which server are you accessing( Informix Dynamic Server or Extended
  634. ; Parallel Server) it may have an additional third parameters. See Informix document
  635. ; for all options.
  636. nc:if_dbinfo(%1c {, %2cdinst {, %3c}})=DBINFO(%1 {, %2 {, %3}});
  637. c:if_trim_both(%1c)=TRIM(BOTH FROM %1);
  638. c:if_trim_leading(%1c)=TRIM(LEADING FROM %1);
  639. c:if_trim_trailing(%1c)=TRIM(TRAILING FROM %1);
  640. c:truncate(%1c)=TRIM(TRAILING FROM %1);
  641. ;
  642. ; Entries in [Operator Addition] and [Operator Subtraction] were obtained
  643. ; from Informix Guide to SQL: Reference, Version 7.2, p. 3-30 -> 3.34
  644. ;
  645. [Operator Addition]
  646. Date=IV,TS
  647. Time=
  648. Timestamp=IV,TS
  649. Interval=TS,TS:IV,IV:DT,TS
  650. [Operator Subtraction]
  651. Date=TS,IV:IV,TS:DT,IV
  652. Time=
  653. Timestamp=DT,IV:TS,IV:IV,DT
  654. Interval=IV,IV
  655. [Operator Comparison]
  656. Date=DT,OK:TS,OK
  657. Timestamp=TS,OK:DT,OK
  658. Interval=IV,OK
  659. [Directives Session]
  660. ;
  661. ; IMPORTANT!!!
  662. ; Users can execute the following SQL statements
  663. ;
  664. ; SET OPTIMIZATION level_option
  665. ; SET OPTIMIZATION rows_option
  666. ;
  667. ; where rows_option is either ALL_ROWS (server default) or FIRST_ROWS,
  668. ; and level_option is either HIGH (server default) or LOW. (Consult
  669. ; the Performance Guide or the Syntax Guide for the meanings of these
  670. ; these options.) To execute these SQL statements, assign them to the
  671. ; the following entries (Note: these entries must not be preceded by
  672. ; any space character):
  673. ;
  674. ; Dop_Text="SET OPTIMIZATION level_option"
  675. ; First_Row_Text="SET OPTIMIZATION rows_option"
  676. ;
  677. ; NOTES:
  678. ; (1) Not all IDS servers support Optimization Goal and Table Ordering.
  679. ; (2) Users may modify the strings (i.e. level_option, rows_option) of
  680. ; Dop_Text and First_Row_Text, but they must NOT comment out or
  681. ; delete these entries as their presence indicates which IDS server
  682. ; supports what.
  683. ; (3) The string of Dop_Text will be executed first, followed by the
  684. ; string of First_Row_Text (if applicable).
  685. ;
  686. Dop_Text="SET OPTIMIZATION HIGH"
  687. Ordered_Pos=Block_Comment
  688. Ordered_Text="ORDERED"
  689. ; Optimizer hint in Informix uses the /*+ FIRST_ROWS */ keyword
  690. ; right after SELECT statement, before Row Limit directive. By
  691. ; default, the first row optimizer is turned off due to performance
  692. ; issues. (Trakker 493725) To turn on first row optimization, set
  693. ; First_Row_Text=FIRST_ROWS".
  694. First_Row_Text=
  695. First_Row_Pos=Block_Comment
  696. Append_Pre_Text=""
  697. Append_Post_Text=""
  698. Block_Comment_Pre_Text="/*+"
  699. Block_Comment_Post_Text="*/"
  700. ; Row Limit in Informix is achieved by adding the following line
  701. ; FIRST n
  702. ; Right after the first SELECT, but before DISTINCT
  703. Query_Row_Limit_Pos=Append_Select
  704. Query_Row_Limit_Text=" FIRST %d "
  705. [Gateway Environment]
  706. Temporary Blobs=
  707. ;
  708. ; "Poll For Cancel Timeout"
  709. ; Number of milliseconds before checking for cancel of
  710. ; cursor open.
  711. ; 0 - disables ability to cancel a query
  712. ; n - # milliseconds.
  713. ; Default is 1000 (1 second)
  714. ; Notes:
  715. ; 1) only used under WinNT/95 with Informix 7.1
  716. ; 2) see INFORMIX E-SQL/C Programmers Manual v7.1
  717. ; on "sqlbreakcallback" function
  718. ;
  719. Poll For Cancel Timeout=1000
  720. ;
  721. ; If the query
  722. ; SELECT owner FROM 'informix'.systables WHERE tabid = 99
  723. ; does NOT generate a string in the format x.yzwv where x.yzwv
  724. ; is normally the server version, then the user may wish to enter
  725. ; the server version manually. For example, the result given by
  726. ; the above query is the string INFORMIX, and the user knows that
  727. ; the server version is 7.10.UD1, then the entry to be added is
  728. ; (note that there must be NO blanks preceding the entry!):
  729. ; INFORMIX=7.10.UD1
  730. ;
  731. informix=7.10.UD1
  732. [Misc]
  733. ; Default processing mode.
  734. Processing Mode=Limited Local
  735. ; Default values for proc params
  736. DefaultCharPrecision = 2048
  737. DefaultVCharPrecision = 2048
  738. DefaultDecimalPrecision = 32
  739. DefaultDecimalScale = 8
  740. ; Release Informix cursor resources at EOD of fetch
  741. RELEASE_IF_CURSOR_AT_EOD=T
  742. [UDA USER OPTIONS]
  743. ;
  744. ; NOTES:
  745. ; 1) All SQL statements to be executed must end with a semicolon (;)
  746. ; and appear on the SAME line.
  747. ; 2) The list of statements must NOT be preceded or followed by a
  748. ; double quote; for example
  749. ;
  750. ; Attach=SET PDQPRIORITY HIGH; SET OPTIMIZATION ALL_ROWS;
  751. Attach=
  752. [I18N Encoding Mapping]
  753. PC-Latin-1=ibm-850
  754. PC-Latin-2=ibm-852
  755. ISO-7-Danish=ISO8859-7
  756. 646de=iso646-us
  757. ISO-10646=iso646-us
  758. sjis-s=ibm-932
  759. ujis=ibm-eucJP
  760. ksc=deckorean
  761. 866=ibm-808
  762. 1251=cp1251
  763. 1252=cp1252
  764. KOI-8=ibm-878
  765. thai620=ibm-1162
  766. gb=ibm-1383
  767. GB18030-2000=gb18030
  768. euctw=ibm-964
  769. rom8=ibm-1051
  770. 57372=utf-8
  771. [Operator Cast]
  772. AD=TT,NA:TZ,NA
  773. TM=TS,NA
  774. SM=IV,NA:IY,NA
  775. IT=IV,NA:IY,NA
  776. QD=IV,NA:IY,NA
  777. DM=IV,NA:IY,NA
  778. NU=IV,NA:IY,NA
  779. FL=IV,NA:IY,NA
  780. DB=IV,NA:IY,NA
  781. ;ODBC gatway entries
  782. [DATABASE:INFORMIX]
  783. DBINFO_SUBTYPE="Database:IDS"
  784. DBINFO_SUBSECTIONS="DBNAM,DBMAJ,DBMIN"
  785. SQL_API_SQLSPECIALCOLUMNS="FALSE"
  786. Exec_OptimizerGoal_FirstRow="SET OPTIMIZATION FIRST_ROWS"
  787. Exec_OptimizerGoal_AllRows="SET OPTIMIZATION ALL_ROWS"
  788. Exec_OptimizerLevel="SET OPTIMIZATION %d "
  789. OptimizerLevel_Translation_Tbl="0:LOW,1:HIGH,"
  790. OptimizerLevel_Low_Range="0"
  791. OptimizerLevel_High_Range="1"
  792. [DATABASE:INFORMIX VERSION:11.70]
  793. DBINFO_SUBTYPE="Database:IDS INFORMIX11.70"
  794. [DATABASE:INFORMIX VERSION:11.50]
  795. DBINFO_SUBTYPE="Database:IDS INFORMIX11.50"
  796. [DATABASE:INFORMIX VERSION:11.10]
  797. DBINFO_SUBTYPE="Database:IDS INFORMIX11.10"
  798. [DATABASE:INFORMIX VERSION:10.00]
  799. DBINFO_SUBTYPE="Database:IDS INFORMIX10.00"
  800. [DATABASE:INFORMIX VERSION:09.40]
  801. DBINFO_SUBTYPE="Database:IDS INFORMIX9.40"
  802. [DATABASE:INFORMIX VERSION:09.14]
  803. DBINFO_SUBTYPE="Database:IDS INFORMIX9.14"
  804. [DATABASE:INFORMIX VERSION:07.31]
  805. DBINFO_SUBTYPE="Database:IDS INFORMIX7.31"
  806. [DATABASE:INFORMIX VERSION:07.12]
  807. DBINFO_SUBTYPE="Database:IDS INFORMIX7.12"
  808. [DATABASE:INFORMIX VERSION:08]
  809. DBINFO_SUBTYPE="Database:XPS"
  810. [DATABASE:XPS VERSION:08.40]
  811. DBINFO_SUBTYPE="Database:XPS INFORMIX8.40"
  812. [DATABASE:INFORMIX VERSION:08.30]
  813. DBINFO_SUBTYPE="Database:XPS INFORMIX8.30"