Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 145.69 KB | None | 0 0
  1. -- psql -d postgres -a -f implicitCasts.sql > result.log 2>&1
  2. \pset null 'NULL'
  3. Null display is "NULL".
  4. DROP TYPE IF EXISTS structIntDoubleTy;
  5. psql:implicitCasts.sql:4: ERROR: cannot drop type structintdoublety because other objects depend on it
  6. DETAIL: column structintdoubleval of table dststructintdoublevaltable depends on type structintdoublety
  7. column structintdoubleval of table srctesttable depends on type structintdoublety
  8. function structintdoublein(structintdoublety) depends on type structintdoublety
  9. HINT: Use DROP ... CASCADE to drop the dependent objects too.
  10. DROP TYPE IF EXISTS structStringIntTy;
  11. psql:implicitCasts.sql:5: ERROR: cannot drop type structstringintty because other objects depend on it
  12. DETAIL: column structstringintval of table dststructstringintvaltable depends on type structstringintty
  13. column structstringintval of table srctesttable depends on type structstringintty
  14. function structstringintin(structstringintty) depends on type structstringintty
  15. HINT: Use DROP ... CASCADE to drop the dependent objects too.
  16. CREATE TYPE structIntDoubleTy AS (
  17. d0 int,
  18. d1 float8
  19. );
  20. psql:implicitCasts.sql:10: ERROR: type "structintdoublety" already exists
  21. CREATE TYPE structStringIntTy AS (
  22. d0 text,
  23. d1 int
  24. );
  25. psql:implicitCasts.sql:15: ERROR: type "structstringintty" already exists
  26. DROP TABLE IF EXISTS srcTestTable;
  27. DROP TABLE
  28. CREATE TABLE srcTestTable(
  29. shortVal smallint,
  30. intVal int,
  31. longVal bigint,
  32. doubleVal float8,
  33. floatVal float4,
  34. decimal3_0Val decimal(3, 0),
  35. decimal5_0Val decimal(5, 0),
  36. decimal10_0Val decimal(10, 0),
  37. decimal10_2Val decimal(10, 2),
  38. decimal20_0Val decimal(20, 0),
  39. decimal30_15Val decimal(30, 15),
  40. decimal14_7Val decimal(14, 7),
  41. binaryVal bytea,
  42. booleanVal boolean,
  43. stringVal text,
  44. dateVal date,
  45. timestampVal timestamp,
  46. arrayIntVal int[],
  47. arrayDoubleVal float8[],
  48. structIntDoubleVal structIntDoubleTy,
  49. structStringIntVal structStringIntTy
  50. );
  51. CREATE TABLE
  52. INSERT INTO srcTestTable VALUES(
  53. 1, 1, 1, 1.0, 1.0, 1, 1, 1, 1.0, 1.0, 1.0, 1.0, 'abc', true, 'abc', '1970-01-01', '1970-01-01 00:00:00',
  54. '{1, 2, 3}', '{1.0, 2.0, 3.0}', ROW(1, 1.0), ROW('a', 1)
  55. );
  56. INSERT 0 1
  57. INSERT INTO srcTestTable VALUES(
  58. 32767, 2147483647, 9223372036854775807, 1.797693e+308, 3.402823e+38,
  59. 999, 99999, 9999999999, 99999.99, 9999999999999999999, 999999999999999.999999999999999, 9999999.9999999,
  60. 'def', false, 'def', '2018-07-06', '2018-07-06 00:00:00',
  61. '{4, 5, 6}', '{4.0, 5.0, 6.0}', ROW(2, 2.0), ROW('b', 2)
  62. );
  63. INSERT 0 1
  64. SELECT * FROM srcTestTable;
  65. shortval | intval | longval | doubleval | floatval | decimal3_0val | decimal5_0val | decimal10_0val | decimal10_2val | decimal20_0val | decimal30_15val | decimal14_7val | binaryval | booleanval | stringval | dateval | timestampval | arrayintval | arraydoubleval | structintdoubleval | structstringintval
  66. ----------+------------+---------------------+---------------+-------------+---------------+---------------+----------------+----------------+---------------------+---------------------------------+-----------------+-----------+------------+-----------+------------+---------------------+-------------+----------------+--------------------+--------------------
  67. 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1.00 | 1 | 1.000000000000000 | 1.0000000 | \x616263 | t | abc | 1970-01-01 | 1970-01-01 00:00:00 | {1,2,3} | {1,2,3} | (1,1) | (a,1)
  68. 32767 | 2147483647 | 9223372036854775807 | 1.797693e+308 | 3.40282e+38 | 999 | 99999 | 9999999999 | 99999.99 | 9999999999999999999 | 999999999999999.999999999999999 | 9999999.9999999 | \x646566 | f | def | 2018-07-06 | 2018-07-06 00:00:00 | {4,5,6} | {4,5,6} | (2,2) | (b,2)
  69. (2 rows)
  70.  
  71. -- binary arithmetic expression cases
  72. -- (short, *)
  73. SELECT pg_typeof(shortVal * intVal) FROM srcTestTable WHERE shortVal = 1;
  74. pg_typeof
  75. -----------
  76. integer
  77. (1 row)
  78.  
  79. SELECT pg_typeof(shortVal * longVal) FROM srcTestTable WHERE shortVal = 1;
  80. pg_typeof
  81. -----------
  82. bigint
  83. (1 row)
  84.  
  85. SELECT pg_typeof(shortVal * doubleVal) FROM srcTestTable WHERE shortVal = 1;
  86. pg_typeof
  87. ------------------
  88. double precision
  89. (1 row)
  90.  
  91. SELECT pg_typeof(shortVal * floatVal) FROM srcTestTable WHERE shortVal = 1;
  92. pg_typeof
  93. ------------------
  94. double precision
  95. (1 row)
  96.  
  97. SELECT pg_typeof(shortVal * decimal3_0Val) FROM srcTestTable WHERE shortVal = 1;
  98. pg_typeof
  99. -----------
  100. numeric
  101. (1 row)
  102.  
  103. SELECT pg_typeof(shortVal * decimal5_0Val) FROM srcTestTable WHERE shortVal = 1;
  104. pg_typeof
  105. -----------
  106. numeric
  107. (1 row)
  108.  
  109. SELECT pg_typeof(shortVal * decimal10_0Val) FROM srcTestTable WHERE shortVal = 1;
  110. pg_typeof
  111. -----------
  112. numeric
  113. (1 row)
  114.  
  115. SELECT pg_typeof(shortVal * decimal10_2Val) FROM srcTestTable WHERE shortVal = 1;
  116. pg_typeof
  117. -----------
  118. numeric
  119. (1 row)
  120.  
  121. SELECT pg_typeof(shortVal * decimal20_0Val) FROM srcTestTable WHERE shortVal = 1;
  122. pg_typeof
  123. -----------
  124. numeric
  125. (1 row)
  126.  
  127. SELECT pg_typeof(shortVal * decimal30_15Val) FROM srcTestTable WHERE shortVal = 1;
  128. pg_typeof
  129. -----------
  130. numeric
  131. (1 row)
  132.  
  133. SELECT pg_typeof(shortVal * decimal14_7Val) FROM srcTestTable WHERE shortVal = 1;
  134. pg_typeof
  135. -----------
  136. numeric
  137. (1 row)
  138.  
  139. -- (int, *)
  140. SELECT pg_typeof(intVal * longVal) FROM srcTestTable WHERE intVal = 1;
  141. pg_typeof
  142. -----------
  143. bigint
  144. (1 row)
  145.  
  146. SELECT pg_typeof(intVal * doubleVal) FROM srcTestTable WHERE intVal = 1;
  147. pg_typeof
  148. ------------------
  149. double precision
  150. (1 row)
  151.  
  152. SELECT pg_typeof(intVal * floatVal) FROM srcTestTable WHERE intVal = 1;
  153. pg_typeof
  154. ------------------
  155. double precision
  156. (1 row)
  157.  
  158. SELECT pg_typeof(intVal * decimal3_0Val) FROM srcTestTable WHERE intVal = 1;
  159. pg_typeof
  160. -----------
  161. numeric
  162. (1 row)
  163.  
  164. SELECT pg_typeof(intVal * decimal5_0Val) FROM srcTestTable WHERE intVal = 1;
  165. pg_typeof
  166. -----------
  167. numeric
  168. (1 row)
  169.  
  170. SELECT pg_typeof(intVal * decimal10_0Val) FROM srcTestTable WHERE intVal = 1;
  171. pg_typeof
  172. -----------
  173. numeric
  174. (1 row)
  175.  
  176. SELECT pg_typeof(intVal * decimal10_2Val) FROM srcTestTable WHERE intVal = 1;
  177. pg_typeof
  178. -----------
  179. numeric
  180. (1 row)
  181.  
  182. SELECT pg_typeof(intVal * decimal20_0Val) FROM srcTestTable WHERE intVal = 1;
  183. pg_typeof
  184. -----------
  185. numeric
  186. (1 row)
  187.  
  188. SELECT pg_typeof(intVal * decimal30_15Val) FROM srcTestTable WHERE intVal = 1;
  189. pg_typeof
  190. -----------
  191. numeric
  192. (1 row)
  193.  
  194. SELECT pg_typeof(intVal * decimal14_7Val) FROM srcTestTable WHERE intVal = 1;
  195. pg_typeof
  196. -----------
  197. numeric
  198. (1 row)
  199.  
  200. -- (long, *)
  201. SELECT pg_typeof(longVal * doubleVal) FROM srcTestTable WHERE longVal = 1;
  202. pg_typeof
  203. ------------------
  204. double precision
  205. (1 row)
  206.  
  207. SELECT pg_typeof(longVal * floatVal) FROM srcTestTable WHERE longVal = 1;
  208. pg_typeof
  209. ------------------
  210. double precision
  211. (1 row)
  212.  
  213. SELECT pg_typeof(longVal * decimal3_0Val) FROM srcTestTable WHERE longVal = 1;
  214. pg_typeof
  215. -----------
  216. numeric
  217. (1 row)
  218.  
  219. SELECT pg_typeof(longVal * decimal5_0Val) FROM srcTestTable WHERE longVal = 1;
  220. pg_typeof
  221. -----------
  222. numeric
  223. (1 row)
  224.  
  225. SELECT pg_typeof(longVal * decimal10_0Val) FROM srcTestTable WHERE longVal = 1;
  226. pg_typeof
  227. -----------
  228. numeric
  229. (1 row)
  230.  
  231. SELECT pg_typeof(longVal * decimal10_2Val) FROM srcTestTable WHERE longVal = 1;
  232. pg_typeof
  233. -----------
  234. numeric
  235. (1 row)
  236.  
  237. SELECT pg_typeof(longVal * decimal20_0Val) FROM srcTestTable WHERE longVal = 1;
  238. pg_typeof
  239. -----------
  240. numeric
  241. (1 row)
  242.  
  243. SELECT pg_typeof(longVal * decimal30_15Val) FROM srcTestTable WHERE longVal = 1;
  244. pg_typeof
  245. -----------
  246. numeric
  247. (1 row)
  248.  
  249. SELECT pg_typeof(longVal * decimal14_7Val) FROM srcTestTable WHERE longVal = 1;
  250. pg_typeof
  251. -----------
  252. numeric
  253. (1 row)
  254.  
  255. -- (double, *)
  256. SELECT pg_typeof(doubleVal * floatVal) FROM srcTestTable WHERE doubleVal < 1.1;
  257. pg_typeof
  258. ------------------
  259. double precision
  260. (1 row)
  261.  
  262. SELECT pg_typeof(doubleVal * decimal3_0Val) FROM srcTestTable WHERE doubleVal < 1.1;
  263. pg_typeof
  264. ------------------
  265. double precision
  266. (1 row)
  267.  
  268. SELECT pg_typeof(doubleVal * decimal5_0Val) FROM srcTestTable WHERE doubleVal < 1.1;
  269. pg_typeof
  270. ------------------
  271. double precision
  272. (1 row)
  273.  
  274. SELECT pg_typeof(doubleVal * decimal10_0Val) FROM srcTestTable WHERE doubleVal < 1.1;
  275. pg_typeof
  276. ------------------
  277. double precision
  278. (1 row)
  279.  
  280. SELECT pg_typeof(doubleVal * decimal10_2Val) FROM srcTestTable WHERE doubleVal < 1.1;
  281. pg_typeof
  282. ------------------
  283. double precision
  284. (1 row)
  285.  
  286. SELECT pg_typeof(doubleVal * decimal20_0Val) FROM srcTestTable WHERE doubleVal < 1.1;
  287. pg_typeof
  288. ------------------
  289. double precision
  290. (1 row)
  291.  
  292. SELECT pg_typeof(doubleVal * decimal30_15Val) FROM srcTestTable WHERE doubleVal < 1.1;
  293. pg_typeof
  294. ------------------
  295. double precision
  296. (1 row)
  297.  
  298. SELECT pg_typeof(doubleVal * decimal14_7Val) FROM srcTestTable WHERE doubleVal < 1.1;
  299. pg_typeof
  300. ------------------
  301. double precision
  302. (1 row)
  303.  
  304. -- (float, *)
  305. SELECT pg_typeof(floatVal * decimal3_0Val) FROM srcTestTable WHERE floatVal < 1.1;
  306. pg_typeof
  307. ------------------
  308. double precision
  309. (1 row)
  310.  
  311. SELECT pg_typeof(floatVal * decimal5_0Val) FROM srcTestTable WHERE floatVal < 1.1;
  312. pg_typeof
  313. ------------------
  314. double precision
  315. (1 row)
  316.  
  317. SELECT pg_typeof(floatVal * decimal10_0Val) FROM srcTestTable WHERE floatVal < 1.1;
  318. pg_typeof
  319. ------------------
  320. double precision
  321. (1 row)
  322.  
  323. SELECT pg_typeof(floatVal * decimal10_2Val) FROM srcTestTable WHERE floatVal < 1.1;
  324. pg_typeof
  325. ------------------
  326. double precision
  327. (1 row)
  328.  
  329. SELECT pg_typeof(floatVal * decimal20_0Val) FROM srcTestTable WHERE floatVal < 1.1;
  330. pg_typeof
  331. ------------------
  332. double precision
  333. (1 row)
  334.  
  335. SELECT pg_typeof(floatVal * decimal30_15Val) FROM srcTestTable WHERE floatVal < 1.1;
  336. pg_typeof
  337. ------------------
  338. double precision
  339. (1 row)
  340.  
  341. SELECT pg_typeof(floatVal * decimal14_7Val) FROM srcTestTable WHERE floatVal < 1.1;
  342. pg_typeof
  343. ------------------
  344. double precision
  345. (1 row)
  346.  
  347. -- (decimal(3, 0), *)
  348. SELECT pg_typeof(decimal3_0Val * decimal5_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  349. pg_typeof
  350. -----------
  351. numeric
  352. (1 row)
  353.  
  354. SELECT pg_typeof(decimal3_0Val * decimal10_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  355. pg_typeof
  356. -----------
  357. numeric
  358. (1 row)
  359.  
  360. SELECT pg_typeof(decimal3_0Val * decimal10_2Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  361. pg_typeof
  362. -----------
  363. numeric
  364. (1 row)
  365.  
  366. SELECT pg_typeof(decimal3_0Val * decimal20_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  367. pg_typeof
  368. -----------
  369. numeric
  370. (1 row)
  371.  
  372. SELECT pg_typeof(decimal3_0Val * decimal30_15Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  373. pg_typeof
  374. -----------
  375. numeric
  376. (1 row)
  377.  
  378. SELECT pg_typeof(decimal3_0Val * decimal14_7Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  379. pg_typeof
  380. -----------
  381. numeric
  382. (1 row)
  383.  
  384. -- (decimal(5, 0), *)
  385. SELECT pg_typeof(decimal5_0Val * decimal10_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  386. pg_typeof
  387. -----------
  388. numeric
  389. (1 row)
  390.  
  391. SELECT pg_typeof(decimal5_0Val * decimal10_2Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  392. pg_typeof
  393. -----------
  394. numeric
  395. (1 row)
  396.  
  397. SELECT pg_typeof(decimal5_0Val * decimal20_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  398. pg_typeof
  399. -----------
  400. numeric
  401. (1 row)
  402.  
  403. SELECT pg_typeof(decimal5_0Val * decimal30_15Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  404. pg_typeof
  405. -----------
  406. numeric
  407. (1 row)
  408.  
  409. SELECT pg_typeof(decimal5_0Val * decimal14_7Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  410. pg_typeof
  411. -----------
  412. numeric
  413. (1 row)
  414.  
  415. -- (decimal(10, 0), *)
  416. SELECT pg_typeof(decimal10_0Val * decimal10_2Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  417. pg_typeof
  418. -----------
  419. numeric
  420. (1 row)
  421.  
  422. SELECT pg_typeof(decimal10_0Val * decimal20_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  423. pg_typeof
  424. -----------
  425. numeric
  426. (1 row)
  427.  
  428. SELECT pg_typeof(decimal10_0Val * decimal30_15Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  429. pg_typeof
  430. -----------
  431. numeric
  432. (1 row)
  433.  
  434. SELECT pg_typeof(decimal10_0Val * decimal14_7Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  435. pg_typeof
  436. -----------
  437. numeric
  438. (1 row)
  439.  
  440. -- (decimal(10, 2), *)
  441. SELECT pg_typeof(decimal10_2Val * decimal20_0Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  442. pg_typeof
  443. -----------
  444. numeric
  445. (1 row)
  446.  
  447. SELECT pg_typeof(decimal10_2Val * decimal30_15Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  448. pg_typeof
  449. -----------
  450. numeric
  451. (1 row)
  452.  
  453. SELECT pg_typeof(decimal10_2Val * decimal14_7Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  454. pg_typeof
  455. -----------
  456. numeric
  457. (1 row)
  458.  
  459. -- (decimal(30, 15), *)
  460. SELECT pg_typeof(decimal30_15Val * decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  461. pg_typeof
  462. -----------
  463. numeric
  464. (1 row)
  465.  
  466. SELECT pg_typeof(decimal30_15Val * decimal14_7Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  467. pg_typeof
  468. -----------
  469. numeric
  470. (1 row)
  471.  
  472. -- binary arithmetic expression cases
  473. -- (binary, *)
  474. SELECT pg_typeof(binaryVal || shortVal) FROM srcTestTable LIMIT 1;
  475. psql:implicitCasts.sql:147: ERROR: operator does not exist: bytea || smallint
  476. LINE 1: SELECT pg_typeof(binaryVal || shortVal) FROM srcTestTable LI...
  477. ^
  478. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  479. SELECT pg_typeof(binaryVal || intVal) FROM srcTestTable LIMIT 1;
  480. psql:implicitCasts.sql:148: ERROR: operator does not exist: bytea || integer
  481. LINE 1: SELECT pg_typeof(binaryVal || intVal) FROM srcTestTable LIMI...
  482. ^
  483. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  484. SELECT pg_typeof(binaryVal || longVal) FROM srcTestTable LIMIT 1;
  485. psql:implicitCasts.sql:149: ERROR: operator does not exist: bytea || bigint
  486. LINE 1: SELECT pg_typeof(binaryVal || longVal) FROM srcTestTable LIM...
  487. ^
  488. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  489. SELECT pg_typeof(binaryVal || doubleVal) FROM srcTestTable LIMIT 1;
  490. psql:implicitCasts.sql:150: ERROR: operator does not exist: bytea || double precision
  491. LINE 1: SELECT pg_typeof(binaryVal || doubleVal) FROM srcTestTable L...
  492. ^
  493. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  494. SELECT pg_typeof(binaryVal || floatVal) FROM srcTestTable LIMIT 1;
  495. psql:implicitCasts.sql:151: ERROR: operator does not exist: bytea || real
  496. LINE 1: SELECT pg_typeof(binaryVal || floatVal) FROM srcTestTable LI...
  497. ^
  498. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  499. SELECT pg_typeof(binaryVal || decimal3_0Val) FROM srcTestTable LIMIT 1;
  500. psql:implicitCasts.sql:152: ERROR: operator does not exist: bytea || numeric
  501. LINE 1: SELECT pg_typeof(binaryVal || decimal3_0Val) FROM srcTestTab...
  502. ^
  503. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  504. SELECT pg_typeof(binaryVal || decimal5_0Val) FROM srcTestTable LIMIT 1;
  505. psql:implicitCasts.sql:153: ERROR: operator does not exist: bytea || numeric
  506. LINE 1: SELECT pg_typeof(binaryVal || decimal5_0Val) FROM srcTestTab...
  507. ^
  508. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  509. SELECT pg_typeof(binaryVal || decimal10_0Val) FROM srcTestTable LIMIT 1;
  510. psql:implicitCasts.sql:154: ERROR: operator does not exist: bytea || numeric
  511. LINE 1: SELECT pg_typeof(binaryVal || decimal10_0Val) FROM srcTestTa...
  512. ^
  513. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  514. SELECT pg_typeof(binaryVal || decimal10_2Val) FROM srcTestTable LIMIT 1;
  515. psql:implicitCasts.sql:155: ERROR: operator does not exist: bytea || numeric
  516. LINE 1: SELECT pg_typeof(binaryVal || decimal10_2Val) FROM srcTestTa...
  517. ^
  518. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  519. SELECT pg_typeof(binaryVal || decimal20_0Val) FROM srcTestTable LIMIT 1;
  520. psql:implicitCasts.sql:156: ERROR: operator does not exist: bytea || numeric
  521. LINE 1: SELECT pg_typeof(binaryVal || decimal20_0Val) FROM srcTestTa...
  522. ^
  523. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  524. SELECT pg_typeof(binaryVal || decimal30_15Val) FROM srcTestTable LIMIT 1;
  525. psql:implicitCasts.sql:157: ERROR: operator does not exist: bytea || numeric
  526. LINE 1: SELECT pg_typeof(binaryVal || decimal30_15Val) FROM srcTestT...
  527. ^
  528. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  529. SELECT pg_typeof(binaryVal || decimal14_7Val) FROM srcTestTable LIMIT 1;
  530. psql:implicitCasts.sql:158: ERROR: operator does not exist: bytea || numeric
  531. LINE 1: SELECT pg_typeof(binaryVal || decimal14_7Val) FROM srcTestTa...
  532. ^
  533. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  534. SELECT pg_typeof(binaryVal || booleanVal) FROM srcTestTable LIMIT 1;
  535. psql:implicitCasts.sql:159: ERROR: operator does not exist: bytea || boolean
  536. LINE 1: SELECT pg_typeof(binaryVal || booleanVal) FROM srcTestTable ...
  537. ^
  538. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  539. SELECT pg_typeof(binaryVal || stringVal) FROM srcTestTable LIMIT 1;
  540. pg_typeof
  541. -----------
  542. text
  543. (1 row)
  544.  
  545. SELECT pg_typeof(binaryVal || dateVal) FROM srcTestTable LIMIT 1;
  546. psql:implicitCasts.sql:161: ERROR: operator does not exist: bytea || date
  547. LINE 1: SELECT pg_typeof(binaryVal || dateVal) FROM srcTestTable LIM...
  548. ^
  549. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  550. SELECT pg_typeof(binaryVal || timestampVal) FROM srcTestTable LIMIT 1;
  551. psql:implicitCasts.sql:162: ERROR: operator does not exist: bytea || timestamp without time zone
  552. LINE 1: SELECT pg_typeof(binaryVal || timestampVal) FROM srcTestTabl...
  553. ^
  554. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  555. SELECT pg_typeof(binaryVal || arrayIntVal) FROM srcTestTable LIMIT 1;
  556. psql:implicitCasts.sql:163: ERROR: operator does not exist: bytea || integer[]
  557. LINE 1: SELECT pg_typeof(binaryVal || arrayIntVal) FROM srcTestTable...
  558. ^
  559. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  560. SELECT pg_typeof(binaryVal || arrayDoubleVal) FROM srcTestTable LIMIT 1;
  561. psql:implicitCasts.sql:164: ERROR: operator does not exist: bytea || double precision[]
  562. LINE 1: SELECT pg_typeof(binaryVal || arrayDoubleVal) FROM srcTestTa...
  563. ^
  564. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  565. SELECT pg_typeof(binaryVal || structIntDoubleVal) FROM srcTestTable LIMIT 1;
  566. psql:implicitCasts.sql:165: ERROR: operator does not exist: bytea || structintdoublety
  567. LINE 1: SELECT pg_typeof(binaryVal || structIntDoubleVal) FROM srcTe...
  568. ^
  569. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  570. SELECT pg_typeof(binaryVal || structStringIntVal) FROM srcTestTable LIMIT 1;
  571. psql:implicitCasts.sql:166: ERROR: operator does not exist: bytea || structstringintty
  572. LINE 1: SELECT pg_typeof(binaryVal || structStringIntVal) FROM srcTe...
  573. ^
  574. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  575. -- (text, *)
  576. SELECT pg_typeof(stringVal || shortVal) FROM srcTestTable LIMIT 1;
  577. pg_typeof
  578. -----------
  579. text
  580. (1 row)
  581.  
  582. SELECT pg_typeof(stringVal || intVal) FROM srcTestTable LIMIT 1;
  583. pg_typeof
  584. -----------
  585. text
  586. (1 row)
  587.  
  588. SELECT pg_typeof(stringVal || longVal) FROM srcTestTable LIMIT 1;
  589. pg_typeof
  590. -----------
  591. text
  592. (1 row)
  593.  
  594. SELECT pg_typeof(stringVal || doubleVal) FROM srcTestTable LIMIT 1;
  595. pg_typeof
  596. -----------
  597. text
  598. (1 row)
  599.  
  600. SELECT pg_typeof(stringVal || floatVal) FROM srcTestTable LIMIT 1;
  601. pg_typeof
  602. -----------
  603. text
  604. (1 row)
  605.  
  606. SELECT pg_typeof(stringVal || decimal3_0Val) FROM srcTestTable LIMIT 1;
  607. pg_typeof
  608. -----------
  609. text
  610. (1 row)
  611.  
  612. SELECT pg_typeof(stringVal || decimal5_0Val) FROM srcTestTable LIMIT 1;
  613. pg_typeof
  614. -----------
  615. text
  616. (1 row)
  617.  
  618. SELECT pg_typeof(stringVal || decimal10_0Val) FROM srcTestTable LIMIT 1;
  619. pg_typeof
  620. -----------
  621. text
  622. (1 row)
  623.  
  624. SELECT pg_typeof(stringVal || decimal10_2Val) FROM srcTestTable LIMIT 1;
  625. pg_typeof
  626. -----------
  627. text
  628. (1 row)
  629.  
  630. SELECT pg_typeof(stringVal || decimal20_0Val) FROM srcTestTable LIMIT 1;
  631. pg_typeof
  632. -----------
  633. text
  634. (1 row)
  635.  
  636. SELECT pg_typeof(stringVal || decimal30_15Val) FROM srcTestTable LIMIT 1;
  637. pg_typeof
  638. -----------
  639. text
  640. (1 row)
  641.  
  642. SELECT pg_typeof(stringVal || decimal14_7Val) FROM srcTestTable LIMIT 1;
  643. pg_typeof
  644. -----------
  645. text
  646. (1 row)
  647.  
  648. SELECT pg_typeof(stringVal || booleanVal) FROM srcTestTable LIMIT 1;
  649. pg_typeof
  650. -----------
  651. text
  652. (1 row)
  653.  
  654. SELECT pg_typeof(stringVal || stringVal) FROM srcTestTable LIMIT 1;
  655. pg_typeof
  656. -----------
  657. text
  658. (1 row)
  659.  
  660. SELECT pg_typeof(stringVal || dateVal) FROM srcTestTable LIMIT 1;
  661. pg_typeof
  662. -----------
  663. text
  664. (1 row)
  665.  
  666. SELECT pg_typeof(stringVal || timestampVal) FROM srcTestTable LIMIT 1;
  667. pg_typeof
  668. -----------
  669. text
  670. (1 row)
  671.  
  672. SELECT pg_typeof(stringVal || arrayIntVal) FROM srcTestTable LIMIT 1;
  673. psql:implicitCasts.sql:185: ERROR: operator does not exist: text || integer[]
  674. LINE 1: SELECT pg_typeof(stringVal || arrayIntVal) FROM srcTestTable...
  675. ^
  676. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  677. SELECT pg_typeof(stringVal || arrayDoubleVal) FROM srcTestTable LIMIT 1;
  678. psql:implicitCasts.sql:186: ERROR: operator does not exist: text || double precision[]
  679. LINE 1: SELECT pg_typeof(stringVal || arrayDoubleVal) FROM srcTestTa...
  680. ^
  681. HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
  682. SELECT pg_typeof(stringVal || structIntDoubleVal) FROM srcTestTable LIMIT 1;
  683. pg_typeof
  684. -----------
  685. text
  686. (1 row)
  687.  
  688. SELECT pg_typeof(stringVal || structStringIntVal) FROM srcTestTable LIMIT 1;
  689. pg_typeof
  690. -----------
  691. text
  692. (1 row)
  693.  
  694. -- function inputs
  695. -- from * to short
  696. DROP FUNCTION IF EXISTS shortIn;
  697. DROP FUNCTION
  698. CREATE FUNCTION shortIn(smallint) RETURNS smallint
  699. AS 'select $1;'
  700. LANGUAGE SQL
  701. IMMUTABLE
  702. RETURNS NULL ON NULL INPUT;
  703. CREATE FUNCTION
  704. SELECT shortIn(intVal) FROM srcTestTable WHERE intVal = 1;
  705. psql:implicitCasts.sql:201: ERROR: function shortin(integer) does not exist
  706. LINE 1: SELECT shortIn(intVal) FROM srcTestTable WHERE intVal = 1;
  707. ^
  708. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  709. SELECT shortIn(longVal) FROM srcTestTable WHERE longVal = 1;
  710. psql:implicitCasts.sql:202: ERROR: function shortin(bigint) does not exist
  711. LINE 1: SELECT shortIn(longVal) FROM srcTestTable WHERE longVal = 1;
  712. ^
  713. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  714. SELECT shortIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  715. psql:implicitCasts.sql:203: ERROR: function shortin(double precision) does not exist
  716. LINE 1: SELECT shortIn(doubleVal) FROM srcTestTable WHERE doubleVal ...
  717. ^
  718. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  719. SELECT shortIn(floatVal) FROM srcTestTable WHERE floatVal < 1.1;
  720. psql:implicitCasts.sql:204: ERROR: function shortin(real) does not exist
  721. LINE 1: SELECT shortIn(floatVal) FROM srcTestTable WHERE floatVal < ...
  722. ^
  723. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  724. SELECT shortIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  725. psql:implicitCasts.sql:205: ERROR: function shortin(numeric) does not exist
  726. LINE 1: SELECT shortIn(decimal3_0Val) FROM srcTestTable WHERE decima...
  727. ^
  728. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  729. SELECT shortIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  730. psql:implicitCasts.sql:206: ERROR: function shortin(numeric) does not exist
  731. LINE 1: SELECT shortIn(decimal5_0Val) FROM srcTestTable WHERE decima...
  732. ^
  733. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  734. SELECT shortIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  735. psql:implicitCasts.sql:207: ERROR: function shortin(numeric) does not exist
  736. LINE 1: SELECT shortIn(decimal10_0Val) FROM srcTestTable WHERE decim...
  737. ^
  738. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  739. SELECT shortIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  740. psql:implicitCasts.sql:208: ERROR: function shortin(numeric) does not exist
  741. LINE 1: SELECT shortIn(decimal10_2Val) FROM srcTestTable WHERE decim...
  742. ^
  743. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  744. SELECT shortIn(decimal20_0Val) FROM srcTestTable WHERE decimal20_0Val = 1;
  745. psql:implicitCasts.sql:209: ERROR: function shortin(numeric) does not exist
  746. LINE 1: SELECT shortIn(decimal20_0Val) FROM srcTestTable WHERE decim...
  747. ^
  748. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  749. SELECT shortIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  750. psql:implicitCasts.sql:210: ERROR: function shortin(numeric) does not exist
  751. LINE 1: SELECT shortIn(decimal30_15Val) FROM srcTestTable WHERE deci...
  752. ^
  753. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  754. SELECT shortIn(decimal14_7Val) FROM srcTestTable WHERE decimal14_7Val = 1;
  755. psql:implicitCasts.sql:211: ERROR: function shortin(numeric) does not exist
  756. LINE 1: SELECT shortIn(decimal14_7Val) FROM srcTestTable WHERE decim...
  757. ^
  758. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  759. SELECT shortIn(binaryVal) FROM srcTestTable LIMIT 1;
  760. psql:implicitCasts.sql:212: ERROR: function shortin(bytea) does not exist
  761. LINE 1: SELECT shortIn(binaryVal) FROM srcTestTable LIMIT 1;
  762. ^
  763. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  764. SELECT shortIn(booleanVal) FROM srcTestTable LIMIT 1;
  765. psql:implicitCasts.sql:213: ERROR: function shortin(boolean) does not exist
  766. LINE 1: SELECT shortIn(booleanVal) FROM srcTestTable LIMIT 1;
  767. ^
  768. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  769. SELECT shortIn(stringVal) FROM srcTestTable LIMIT 1;
  770. psql:implicitCasts.sql:214: ERROR: function shortin(text) does not exist
  771. LINE 1: SELECT shortIn(stringVal) FROM srcTestTable LIMIT 1;
  772. ^
  773. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  774. SELECT shortIn(dateVal) FROM srcTestTable LIMIT 1;
  775. psql:implicitCasts.sql:215: ERROR: function shortin(date) does not exist
  776. LINE 1: SELECT shortIn(dateVal) FROM srcTestTable LIMIT 1;
  777. ^
  778. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  779. SELECT shortIn(timestampVal) FROM srcTestTable LIMIT 1;
  780. psql:implicitCasts.sql:216: ERROR: function shortin(timestamp without time zone) does not exist
  781. LINE 1: SELECT shortIn(timestampVal) FROM srcTestTable LIMIT 1;
  782. ^
  783. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  784. SELECT shortIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  785. psql:implicitCasts.sql:217: ERROR: function shortin(integer[]) does not exist
  786. LINE 1: SELECT shortIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  787. ^
  788. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  789. SELECT shortIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  790. psql:implicitCasts.sql:218: ERROR: function shortin(double precision[]) does not exist
  791. LINE 1: SELECT shortIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  792. ^
  793. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  794. SELECT shortIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  795. psql:implicitCasts.sql:219: ERROR: function shortin(structintdoublety) does not exist
  796. LINE 1: SELECT shortIn(structIntDoubleVal) FROM srcTestTable LIMIT 1...
  797. ^
  798. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  799. SELECT shortIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  800. psql:implicitCasts.sql:220: ERROR: function shortin(structstringintty) does not exist
  801. LINE 1: SELECT shortIn(structStringIntVal) FROM srcTestTable LIMIT 1...
  802. ^
  803. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  804. SELECT shortIn(null);
  805. shortin
  806. ---------
  807. NULL
  808. (1 row)
  809.  
  810. -- from * to int
  811. DROP FUNCTION IF EXISTS intIn;
  812. DROP FUNCTION
  813. CREATE FUNCTION intIn(int) RETURNS int
  814. AS 'select $1;'
  815. LANGUAGE SQL
  816. IMMUTABLE
  817. RETURNS NULL ON NULL INPUT;
  818. CREATE FUNCTION
  819. SELECT intIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  820. intin
  821. -------
  822. 1
  823. (1 row)
  824.  
  825. SELECT intIn(longVal) FROM srcTestTable WHERE longVal = 1;
  826. psql:implicitCasts.sql:232: ERROR: function intin(bigint) does not exist
  827. LINE 1: SELECT intIn(longVal) FROM srcTestTable WHERE longVal = 1;
  828. ^
  829. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  830. SELECT intIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  831. psql:implicitCasts.sql:233: ERROR: function intin(double precision) does not exist
  832. LINE 1: SELECT intIn(doubleVal) FROM srcTestTable WHERE doubleVal < ...
  833. ^
  834. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  835. SELECT intIn(floatVal) FROM srcTestTable WHERE floatVal < 1.1;
  836. psql:implicitCasts.sql:234: ERROR: function intin(real) does not exist
  837. LINE 1: SELECT intIn(floatVal) FROM srcTestTable WHERE floatVal < 1....
  838. ^
  839. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  840. SELECT intIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  841. psql:implicitCasts.sql:235: ERROR: function intin(numeric) does not exist
  842. LINE 1: SELECT intIn(decimal3_0Val) FROM srcTestTable WHERE decimal3...
  843. ^
  844. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  845. SELECT intIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  846. psql:implicitCasts.sql:236: ERROR: function intin(numeric) does not exist
  847. LINE 1: SELECT intIn(decimal5_0Val) FROM srcTestTable WHERE decimal5...
  848. ^
  849. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  850. SELECT intIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  851. psql:implicitCasts.sql:237: ERROR: function intin(numeric) does not exist
  852. LINE 1: SELECT intIn(decimal10_0Val) FROM srcTestTable WHERE decimal...
  853. ^
  854. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  855. SELECT intIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  856. psql:implicitCasts.sql:238: ERROR: function intin(numeric) does not exist
  857. LINE 1: SELECT intIn(decimal10_2Val) FROM srcTestTable WHERE decimal...
  858. ^
  859. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  860. SELECT intIn(decimal20_0Val) FROM srcTestTable WHERE decimal20_0Val = 1;
  861. psql:implicitCasts.sql:239: ERROR: function intin(numeric) does not exist
  862. LINE 1: SELECT intIn(decimal20_0Val) FROM srcTestTable WHERE decimal...
  863. ^
  864. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  865. SELECT intIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  866. psql:implicitCasts.sql:240: ERROR: function intin(numeric) does not exist
  867. LINE 1: SELECT intIn(decimal30_15Val) FROM srcTestTable WHERE decima...
  868. ^
  869. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  870. SELECT intIn(decimal14_7Val) FROM srcTestTable WHERE decimal14_7Val = 1;
  871. psql:implicitCasts.sql:241: ERROR: function intin(numeric) does not exist
  872. LINE 1: SELECT intIn(decimal14_7Val) FROM srcTestTable WHERE decimal...
  873. ^
  874. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  875. SELECT intIn(binaryVal) FROM srcTestTable LIMIT 1;
  876. psql:implicitCasts.sql:242: ERROR: function intin(bytea) does not exist
  877. LINE 1: SELECT intIn(binaryVal) FROM srcTestTable LIMIT 1;
  878. ^
  879. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  880. SELECT intIn(booleanVal) FROM srcTestTable LIMIT 1;
  881. psql:implicitCasts.sql:243: ERROR: function intin(boolean) does not exist
  882. LINE 1: SELECT intIn(booleanVal) FROM srcTestTable LIMIT 1;
  883. ^
  884. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  885. SELECT intIn(stringVal) FROM srcTestTable LIMIT 1;
  886. psql:implicitCasts.sql:244: ERROR: function intin(text) does not exist
  887. LINE 1: SELECT intIn(stringVal) FROM srcTestTable LIMIT 1;
  888. ^
  889. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  890. SELECT intIn(dateVal) FROM srcTestTable LIMIT 1;
  891. psql:implicitCasts.sql:245: ERROR: function intin(date) does not exist
  892. LINE 1: SELECT intIn(dateVal) FROM srcTestTable LIMIT 1;
  893. ^
  894. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  895. SELECT intIn(timestampVal) FROM srcTestTable LIMIT 1;
  896. psql:implicitCasts.sql:246: ERROR: function intin(timestamp without time zone) does not exist
  897. LINE 1: SELECT intIn(timestampVal) FROM srcTestTable LIMIT 1;
  898. ^
  899. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  900. SELECT intIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  901. psql:implicitCasts.sql:247: ERROR: function intin(integer[]) does not exist
  902. LINE 1: SELECT intIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  903. ^
  904. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  905. SELECT intIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  906. psql:implicitCasts.sql:248: ERROR: function intin(double precision[]) does not exist
  907. LINE 1: SELECT intIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  908. ^
  909. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  910. SELECT intIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  911. psql:implicitCasts.sql:249: ERROR: function intin(structintdoublety) does not exist
  912. LINE 1: SELECT intIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  913. ^
  914. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  915. SELECT intIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  916. psql:implicitCasts.sql:250: ERROR: function intin(structstringintty) does not exist
  917. LINE 1: SELECT intIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  918. ^
  919. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  920. SELECT intIn(null);
  921. intin
  922. -------
  923. NULL
  924. (1 row)
  925.  
  926. -- from * to long
  927. DROP FUNCTION IF EXISTS longIn;
  928. DROP FUNCTION
  929. CREATE FUNCTION longIn(bigint) RETURNS bigint
  930. AS 'select $1;'
  931. LANGUAGE SQL
  932. IMMUTABLE
  933. RETURNS NULL ON NULL INPUT;
  934. CREATE FUNCTION
  935. SELECT longIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  936. longin
  937. --------
  938. 1
  939. (1 row)
  940.  
  941. SELECT longIn(intVal) FROM srcTestTable WHERE intVal = 1;
  942. longin
  943. --------
  944. 1
  945. (1 row)
  946.  
  947. SELECT longIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  948. psql:implicitCasts.sql:263: ERROR: function longin(double precision) does not exist
  949. LINE 1: SELECT longIn(doubleVal) FROM srcTestTable WHERE doubleVal <...
  950. ^
  951. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  952. SELECT longIn(floatVal) FROM srcTestTable WHERE floatVal < 1.1;
  953. psql:implicitCasts.sql:264: ERROR: function longin(real) does not exist
  954. LINE 1: SELECT longIn(floatVal) FROM srcTestTable WHERE floatVal < 1...
  955. ^
  956. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  957. SELECT longIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  958. psql:implicitCasts.sql:265: ERROR: function longin(numeric) does not exist
  959. LINE 1: SELECT longIn(decimal3_0Val) FROM srcTestTable WHERE decimal...
  960. ^
  961. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  962. SELECT longIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  963. psql:implicitCasts.sql:266: ERROR: function longin(numeric) does not exist
  964. LINE 1: SELECT longIn(decimal5_0Val) FROM srcTestTable WHERE decimal...
  965. ^
  966. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  967. SELECT longIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  968. psql:implicitCasts.sql:267: ERROR: function longin(numeric) does not exist
  969. LINE 1: SELECT longIn(decimal10_0Val) FROM srcTestTable WHERE decima...
  970. ^
  971. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  972. SELECT longIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  973. psql:implicitCasts.sql:268: ERROR: function longin(numeric) does not exist
  974. LINE 1: SELECT longIn(decimal10_2Val) FROM srcTestTable WHERE decima...
  975. ^
  976. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  977. SELECT longIn(decimal20_0Val) FROM srcTestTable WHERE decimal20_0Val = 1;
  978. psql:implicitCasts.sql:269: ERROR: function longin(numeric) does not exist
  979. LINE 1: SELECT longIn(decimal20_0Val) FROM srcTestTable WHERE decima...
  980. ^
  981. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  982. SELECT longIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  983. psql:implicitCasts.sql:270: ERROR: function longin(numeric) does not exist
  984. LINE 1: SELECT longIn(decimal30_15Val) FROM srcTestTable WHERE decim...
  985. ^
  986. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  987. SELECT longIn(decimal14_7Val) FROM srcTestTable WHERE decimal14_7Val = 1;
  988. psql:implicitCasts.sql:271: ERROR: function longin(numeric) does not exist
  989. LINE 1: SELECT longIn(decimal14_7Val) FROM srcTestTable WHERE decima...
  990. ^
  991. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  992. SELECT longIn(binaryVal) FROM srcTestTable LIMIT 1;
  993. psql:implicitCasts.sql:272: ERROR: function longin(bytea) does not exist
  994. LINE 1: SELECT longIn(binaryVal) FROM srcTestTable LIMIT 1;
  995. ^
  996. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  997. SELECT longIn(booleanVal) FROM srcTestTable LIMIT 1;
  998. psql:implicitCasts.sql:273: ERROR: function longin(boolean) does not exist
  999. LINE 1: SELECT longIn(booleanVal) FROM srcTestTable LIMIT 1;
  1000. ^
  1001. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1002. SELECT longIn(stringVal) FROM srcTestTable LIMIT 1;
  1003. psql:implicitCasts.sql:274: ERROR: function longin(text) does not exist
  1004. LINE 1: SELECT longIn(stringVal) FROM srcTestTable LIMIT 1;
  1005. ^
  1006. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1007. SELECT longIn(dateVal) FROM srcTestTable LIMIT 1;
  1008. psql:implicitCasts.sql:275: ERROR: function longin(date) does not exist
  1009. LINE 1: SELECT longIn(dateVal) FROM srcTestTable LIMIT 1;
  1010. ^
  1011. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1012. SELECT longIn(timestampVal) FROM srcTestTable LIMIT 1;
  1013. psql:implicitCasts.sql:276: ERROR: function longin(timestamp without time zone) does not exist
  1014. LINE 1: SELECT longIn(timestampVal) FROM srcTestTable LIMIT 1;
  1015. ^
  1016. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1017. SELECT longIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  1018. psql:implicitCasts.sql:277: ERROR: function longin(integer[]) does not exist
  1019. LINE 1: SELECT longIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  1020. ^
  1021. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1022. SELECT longIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  1023. psql:implicitCasts.sql:278: ERROR: function longin(double precision[]) does not exist
  1024. LINE 1: SELECT longIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  1025. ^
  1026. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1027. SELECT longIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  1028. psql:implicitCasts.sql:279: ERROR: function longin(structintdoublety) does not exist
  1029. LINE 1: SELECT longIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  1030. ^
  1031. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1032. SELECT longIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  1033. psql:implicitCasts.sql:280: ERROR: function longin(structstringintty) does not exist
  1034. LINE 1: SELECT longIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  1035. ^
  1036. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1037. SELECT longIn(null);
  1038. longin
  1039. --------
  1040. NULL
  1041. (1 row)
  1042.  
  1043. -- from * to float8
  1044. DROP FUNCTION IF EXISTS doubleIn;
  1045. DROP FUNCTION
  1046. CREATE FUNCTION doubleIn(float8) RETURNS float8
  1047. AS 'select $1;'
  1048. LANGUAGE SQL
  1049. IMMUTABLE
  1050. RETURNS NULL ON NULL INPUT;
  1051. CREATE FUNCTION
  1052. SELECT doubleIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  1053. doublein
  1054. ----------
  1055. 1
  1056. (1 row)
  1057.  
  1058. SELECT doubleIn(intVal) FROM srcTestTable WHERE intVal = 1;
  1059. doublein
  1060. ----------
  1061. 1
  1062. (1 row)
  1063.  
  1064. SELECT doubleIn(longVal) FROM srcTestTable WHERE longVal = 1;
  1065. doublein
  1066. ----------
  1067. 1
  1068. (1 row)
  1069.  
  1070. SELECT doubleIn(floatVal) FROM srcTestTable WHERE floatVal < 1.1;
  1071. doublein
  1072. ----------
  1073. 1
  1074. (1 row)
  1075.  
  1076. SELECT doubleIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  1077. doublein
  1078. ----------
  1079. 1
  1080. (1 row)
  1081.  
  1082. SELECT doubleIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  1083. doublein
  1084. ----------
  1085. 1
  1086. (1 row)
  1087.  
  1088. SELECT doubleIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  1089. doublein
  1090. ----------
  1091. 1
  1092. (1 row)
  1093.  
  1094. SELECT doubleIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  1095. doublein
  1096. ----------
  1097. 1
  1098. (1 row)
  1099.  
  1100. SELECT doubleIn(decimal20_0Val) FROM srcTestTable WHERE decimal20_0Val = 1;
  1101. doublein
  1102. ----------
  1103. 1
  1104. (1 row)
  1105.  
  1106. SELECT doubleIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  1107. doublein
  1108. ----------
  1109. 1
  1110. (1 row)
  1111.  
  1112. SELECT doubleIn(decimal14_7Val) FROM srcTestTable WHERE decimal14_7Val = 1;
  1113. doublein
  1114. ----------
  1115. 1
  1116. (1 row)
  1117.  
  1118. SELECT doubleIn(binaryVal) FROM srcTestTable LIMIT 1;
  1119. psql:implicitCasts.sql:302: ERROR: function doublein(bytea) does not exist
  1120. LINE 1: SELECT doubleIn(binaryVal) FROM srcTestTable LIMIT 1;
  1121. ^
  1122. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1123. SELECT doubleIn(booleanVal) FROM srcTestTable LIMIT 1;
  1124. psql:implicitCasts.sql:303: ERROR: function doublein(boolean) does not exist
  1125. LINE 1: SELECT doubleIn(booleanVal) FROM srcTestTable LIMIT 1;
  1126. ^
  1127. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1128. SELECT doubleIn(stringVal) FROM srcTestTable LIMIT 1;
  1129. psql:implicitCasts.sql:304: ERROR: function doublein(text) does not exist
  1130. LINE 1: SELECT doubleIn(stringVal) FROM srcTestTable LIMIT 1;
  1131. ^
  1132. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1133. SELECT doubleIn(dateVal) FROM srcTestTable LIMIT 1;
  1134. psql:implicitCasts.sql:305: ERROR: function doublein(date) does not exist
  1135. LINE 1: SELECT doubleIn(dateVal) FROM srcTestTable LIMIT 1;
  1136. ^
  1137. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1138. SELECT doubleIn(timestampVal) FROM srcTestTable LIMIT 1;
  1139. psql:implicitCasts.sql:306: ERROR: function doublein(timestamp without time zone) does not exist
  1140. LINE 1: SELECT doubleIn(timestampVal) FROM srcTestTable LIMIT 1;
  1141. ^
  1142. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1143. SELECT doubleIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  1144. psql:implicitCasts.sql:307: ERROR: function doublein(integer[]) does not exist
  1145. LINE 1: SELECT doubleIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  1146. ^
  1147. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1148. SELECT doubleIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  1149. psql:implicitCasts.sql:308: ERROR: function doublein(double precision[]) does not exist
  1150. LINE 1: SELECT doubleIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  1151. ^
  1152. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1153. SELECT doubleIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  1154. psql:implicitCasts.sql:309: ERROR: function doublein(structintdoublety) does not exist
  1155. LINE 1: SELECT doubleIn(structIntDoubleVal) FROM srcTestTable LIMIT ...
  1156. ^
  1157. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1158. SELECT doubleIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  1159. psql:implicitCasts.sql:310: ERROR: function doublein(structstringintty) does not exist
  1160. LINE 1: SELECT doubleIn(structStringIntVal) FROM srcTestTable LIMIT ...
  1161. ^
  1162. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1163. SELECT doubleIn(null);
  1164. doublein
  1165. ----------
  1166. NULL
  1167. (1 row)
  1168.  
  1169. -- from * to float4
  1170. DROP FUNCTION IF EXISTS floatIn;
  1171. DROP FUNCTION
  1172. CREATE FUNCTION floatIn(float4) RETURNS float4
  1173. AS 'select $1;'
  1174. LANGUAGE SQL
  1175. IMMUTABLE
  1176. RETURNS NULL ON NULL INPUT;
  1177. CREATE FUNCTION
  1178. SELECT floatIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  1179. floatin
  1180. ---------
  1181. 1
  1182. (1 row)
  1183.  
  1184. SELECT floatIn(intVal) FROM srcTestTable WHERE intVal = 1;
  1185. floatin
  1186. ---------
  1187. 1
  1188. (1 row)
  1189.  
  1190. SELECT floatIn(longVal) FROM srcTestTable WHERE longVal = 1;
  1191. floatin
  1192. ---------
  1193. 1
  1194. (1 row)
  1195.  
  1196. SELECT floatIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  1197. psql:implicitCasts.sql:324: ERROR: function floatin(double precision) does not exist
  1198. LINE 1: SELECT floatIn(doubleVal) FROM srcTestTable WHERE doubleVal ...
  1199. ^
  1200. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1201. SELECT floatIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  1202. floatin
  1203. ---------
  1204. 1
  1205. (1 row)
  1206.  
  1207. SELECT floatIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  1208. floatin
  1209. ---------
  1210. 1
  1211. (1 row)
  1212.  
  1213. SELECT floatIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  1214. floatin
  1215. ---------
  1216. 1
  1217. (1 row)
  1218.  
  1219. SELECT floatIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  1220. floatin
  1221. ---------
  1222. 1
  1223. (1 row)
  1224.  
  1225. SELECT floatIn(decimal20_0Val) FROM srcTestTable WHERE decimal20_0Val = 1;
  1226. floatin
  1227. ---------
  1228. 1
  1229. (1 row)
  1230.  
  1231. SELECT floatIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  1232. floatin
  1233. ---------
  1234. 1
  1235. (1 row)
  1236.  
  1237. SELECT floatIn(decimal14_7Val) FROM srcTestTable WHERE decimal14_7Val = 1;
  1238. floatin
  1239. ---------
  1240. 1
  1241. (1 row)
  1242.  
  1243. SELECT floatIn(binaryVal) FROM srcTestTable LIMIT 1;
  1244. psql:implicitCasts.sql:332: ERROR: function floatin(bytea) does not exist
  1245. LINE 1: SELECT floatIn(binaryVal) FROM srcTestTable LIMIT 1;
  1246. ^
  1247. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1248. SELECT floatIn(booleanVal) FROM srcTestTable LIMIT 1;
  1249. psql:implicitCasts.sql:333: ERROR: function floatin(boolean) does not exist
  1250. LINE 1: SELECT floatIn(booleanVal) FROM srcTestTable LIMIT 1;
  1251. ^
  1252. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1253. SELECT floatIn(stringVal) FROM srcTestTable LIMIT 1;
  1254. psql:implicitCasts.sql:334: ERROR: function floatin(text) does not exist
  1255. LINE 1: SELECT floatIn(stringVal) FROM srcTestTable LIMIT 1;
  1256. ^
  1257. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1258. SELECT floatIn(dateVal) FROM srcTestTable LIMIT 1;
  1259. psql:implicitCasts.sql:335: ERROR: function floatin(date) does not exist
  1260. LINE 1: SELECT floatIn(dateVal) FROM srcTestTable LIMIT 1;
  1261. ^
  1262. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1263. SELECT floatIn(timestampVal) FROM srcTestTable LIMIT 1;
  1264. psql:implicitCasts.sql:336: ERROR: function floatin(timestamp without time zone) does not exist
  1265. LINE 1: SELECT floatIn(timestampVal) FROM srcTestTable LIMIT 1;
  1266. ^
  1267. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1268. SELECT floatIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  1269. psql:implicitCasts.sql:337: ERROR: function floatin(integer[]) does not exist
  1270. LINE 1: SELECT floatIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  1271. ^
  1272. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1273. SELECT floatIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  1274. psql:implicitCasts.sql:338: ERROR: function floatin(double precision[]) does not exist
  1275. LINE 1: SELECT floatIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  1276. ^
  1277. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1278. SELECT floatIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  1279. psql:implicitCasts.sql:339: ERROR: function floatin(structintdoublety) does not exist
  1280. LINE 1: SELECT floatIn(structIntDoubleVal) FROM srcTestTable LIMIT 1...
  1281. ^
  1282. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1283. SELECT floatIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  1284. psql:implicitCasts.sql:340: ERROR: function floatin(structstringintty) does not exist
  1285. LINE 1: SELECT floatIn(structStringIntVal) FROM srcTestTable LIMIT 1...
  1286. ^
  1287. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1288. SELECT floatIn(null);
  1289. floatin
  1290. ---------
  1291. NULL
  1292. (1 row)
  1293.  
  1294. -- from * to decimal(3, 0)
  1295. DROP FUNCTION IF EXISTS decimal3_0In;
  1296. DROP FUNCTION
  1297. CREATE FUNCTION decimal3_0In(decimal(3, 0)) RETURNS decimal(3, 0)
  1298. AS 'select $1;'
  1299. LANGUAGE SQL
  1300. IMMUTABLE
  1301. RETURNS NULL ON NULL INPUT;
  1302. CREATE FUNCTION
  1303. SELECT decimal3_0In(shortVal) FROM srcTestTable WHERE shortVal = 1;
  1304. decimal3_0in
  1305. --------------
  1306. 1
  1307. (1 row)
  1308.  
  1309. SELECT decimal3_0In(intVal) FROM srcTestTable WHERE intVal = 1;
  1310. decimal3_0in
  1311. --------------
  1312. 1
  1313. (1 row)
  1314.  
  1315. SELECT decimal3_0In(longVal) FROM srcTestTable WHERE longVal = 1;
  1316. decimal3_0in
  1317. --------------
  1318. 1
  1319. (1 row)
  1320.  
  1321. SELECT decimal3_0In(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  1322. psql:implicitCasts.sql:354: ERROR: function decimal3_0in(double precision) does not exist
  1323. LINE 1: SELECT decimal3_0In(doubleVal) FROM srcTestTable WHERE doubl...
  1324. ^
  1325. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1326. SELECT decimal3_0In(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  1327. psql:implicitCasts.sql:355: ERROR: function decimal3_0in(real) does not exist
  1328. LINE 1: SELECT decimal3_0In(floatVal) FROM srcTestTable WHERE floatV...
  1329. ^
  1330. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1331. SELECT decimal3_0In(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  1332. decimal3_0in
  1333. --------------
  1334. 1
  1335. (1 row)
  1336.  
  1337. SELECT decimal3_0In(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  1338. decimal3_0in
  1339. --------------
  1340. 1
  1341. (1 row)
  1342.  
  1343. SELECT decimal3_0In(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  1344. decimal3_0in
  1345. --------------
  1346. 1.00
  1347. (1 row)
  1348.  
  1349. SELECT decimal3_0In(decimal20_0Val) FROM srcTestTable WHERE decimal20_0Val = 1;
  1350. decimal3_0in
  1351. --------------
  1352. 1
  1353. (1 row)
  1354.  
  1355. SELECT decimal3_0In(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  1356. decimal3_0in
  1357. -------------------
  1358. 1.000000000000000
  1359. (1 row)
  1360.  
  1361. SELECT decimal3_0In(decimal14_7Val) FROM srcTestTable WHERE decimal14_7Val = 1;
  1362. decimal3_0in
  1363. --------------
  1364. 1.0000000
  1365. (1 row)
  1366.  
  1367. SELECT decimal3_0In(binaryVal) FROM srcTestTable LIMIT 1;
  1368. psql:implicitCasts.sql:362: ERROR: function decimal3_0in(bytea) does not exist
  1369. LINE 1: SELECT decimal3_0In(binaryVal) FROM srcTestTable LIMIT 1;
  1370. ^
  1371. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1372. SELECT decimal3_0In(booleanVal) FROM srcTestTable LIMIT 1;
  1373. psql:implicitCasts.sql:363: ERROR: function decimal3_0in(boolean) does not exist
  1374. LINE 1: SELECT decimal3_0In(booleanVal) FROM srcTestTable LIMIT 1;
  1375. ^
  1376. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1377. SELECT decimal3_0In(stringVal) FROM srcTestTable LIMIT 1;
  1378. psql:implicitCasts.sql:364: ERROR: function decimal3_0in(text) does not exist
  1379. LINE 1: SELECT decimal3_0In(stringVal) FROM srcTestTable LIMIT 1;
  1380. ^
  1381. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1382. SELECT decimal3_0In(dateVal) FROM srcTestTable LIMIT 1;
  1383. psql:implicitCasts.sql:365: ERROR: function decimal3_0in(date) does not exist
  1384. LINE 1: SELECT decimal3_0In(dateVal) FROM srcTestTable LIMIT 1;
  1385. ^
  1386. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1387. SELECT decimal3_0In(timestampVal) FROM srcTestTable LIMIT 1;
  1388. psql:implicitCasts.sql:366: ERROR: function decimal3_0in(timestamp without time zone) does not exist
  1389. LINE 1: SELECT decimal3_0In(timestampVal) FROM srcTestTable LIMIT 1;
  1390. ^
  1391. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1392. SELECT decimal3_0In(arrayIntVal) FROM srcTestTable LIMIT 1;
  1393. psql:implicitCasts.sql:367: ERROR: function decimal3_0in(integer[]) does not exist
  1394. LINE 1: SELECT decimal3_0In(arrayIntVal) FROM srcTestTable LIMIT 1;
  1395. ^
  1396. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1397. SELECT decimal3_0In(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  1398. psql:implicitCasts.sql:368: ERROR: function decimal3_0in(double precision[]) does not exist
  1399. LINE 1: SELECT decimal3_0In(arrayDoubleVal) FROM srcTestTable LIMIT ...
  1400. ^
  1401. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1402. SELECT decimal3_0In(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  1403. psql:implicitCasts.sql:369: ERROR: function decimal3_0in(structintdoublety) does not exist
  1404. LINE 1: SELECT decimal3_0In(structIntDoubleVal) FROM srcTestTable LI...
  1405. ^
  1406. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1407. SELECT decimal3_0In(structStringIntVal) FROM srcTestTable LIMIT 1;
  1408. psql:implicitCasts.sql:370: ERROR: function decimal3_0in(structstringintty) does not exist
  1409. LINE 1: SELECT decimal3_0In(structStringIntVal) FROM srcTestTable LI...
  1410. ^
  1411. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1412. SELECT decimal3_0In(null);
  1413. decimal3_0in
  1414. --------------
  1415. NULL
  1416. (1 row)
  1417.  
  1418. -- from * to decimal(5, 0)
  1419. DROP FUNCTION IF EXISTS decimal5_0In;
  1420. DROP FUNCTION
  1421. CREATE FUNCTION decimal5_0In(decimal(5, 0)) RETURNS decimal(5, 0)
  1422. AS 'select $1;'
  1423. LANGUAGE SQL
  1424. IMMUTABLE
  1425. RETURNS NULL ON NULL INPUT;
  1426. CREATE FUNCTION
  1427. SELECT decimal5_0In(shortVal) FROM srcTestTable WHERE shortVal = 1;
  1428. decimal5_0in
  1429. --------------
  1430. 1
  1431. (1 row)
  1432.  
  1433. SELECT decimal5_0In(intVal) FROM srcTestTable WHERE intVal = 1;
  1434. decimal5_0in
  1435. --------------
  1436. 1
  1437. (1 row)
  1438.  
  1439. SELECT decimal5_0In(longVal) FROM srcTestTable WHERE longVal = 1;
  1440. decimal5_0in
  1441. --------------
  1442. 1
  1443. (1 row)
  1444.  
  1445. SELECT decimal5_0In(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  1446. psql:implicitCasts.sql:384: ERROR: function decimal5_0in(double precision) does not exist
  1447. LINE 1: SELECT decimal5_0In(doubleVal) FROM srcTestTable WHERE doubl...
  1448. ^
  1449. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1450. SELECT decimal5_0In(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  1451. psql:implicitCasts.sql:385: ERROR: function decimal5_0in(real) does not exist
  1452. LINE 1: SELECT decimal5_0In(floatVal) FROM srcTestTable WHERE floatV...
  1453. ^
  1454. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1455. SELECT decimal5_0In(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  1456. decimal5_0in
  1457. --------------
  1458. 1
  1459. (1 row)
  1460.  
  1461. SELECT decimal5_0In(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  1462. decimal5_0in
  1463. --------------
  1464. 1
  1465. (1 row)
  1466.  
  1467. SELECT decimal5_0In(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  1468. decimal5_0in
  1469. --------------
  1470. 1.00
  1471. (1 row)
  1472.  
  1473. SELECT decimal5_0In(decimal20_0Val) FROM srcTestTable WHERE decimal20_0Val = 1;
  1474. decimal5_0in
  1475. --------------
  1476. 1
  1477. (1 row)
  1478.  
  1479. SELECT decimal5_0In(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  1480. decimal5_0in
  1481. -------------------
  1482. 1.000000000000000
  1483. (1 row)
  1484.  
  1485. SELECT decimal5_0In(decimal14_7Val) FROM srcTestTable WHERE decimal14_7Val = 1;
  1486. decimal5_0in
  1487. --------------
  1488. 1.0000000
  1489. (1 row)
  1490.  
  1491. SELECT decimal5_0In(binaryVal) FROM srcTestTable LIMIT 1;
  1492. psql:implicitCasts.sql:392: ERROR: function decimal5_0in(bytea) does not exist
  1493. LINE 1: SELECT decimal5_0In(binaryVal) FROM srcTestTable LIMIT 1;
  1494. ^
  1495. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1496. SELECT decimal5_0In(booleanVal) FROM srcTestTable LIMIT 1;
  1497. psql:implicitCasts.sql:393: ERROR: function decimal5_0in(boolean) does not exist
  1498. LINE 1: SELECT decimal5_0In(booleanVal) FROM srcTestTable LIMIT 1;
  1499. ^
  1500. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1501. SELECT decimal5_0In(stringVal) FROM srcTestTable LIMIT 1;
  1502. psql:implicitCasts.sql:394: ERROR: function decimal5_0in(text) does not exist
  1503. LINE 1: SELECT decimal5_0In(stringVal) FROM srcTestTable LIMIT 1;
  1504. ^
  1505. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1506. SELECT decimal5_0In(dateVal) FROM srcTestTable LIMIT 1;
  1507. psql:implicitCasts.sql:395: ERROR: function decimal5_0in(date) does not exist
  1508. LINE 1: SELECT decimal5_0In(dateVal) FROM srcTestTable LIMIT 1;
  1509. ^
  1510. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1511. SELECT decimal5_0In(timestampVal) FROM srcTestTable LIMIT 1;
  1512. psql:implicitCasts.sql:396: ERROR: function decimal5_0in(timestamp without time zone) does not exist
  1513. LINE 1: SELECT decimal5_0In(timestampVal) FROM srcTestTable LIMIT 1;
  1514. ^
  1515. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1516. SELECT decimal5_0In(arrayIntVal) FROM srcTestTable LIMIT 1;
  1517. psql:implicitCasts.sql:397: ERROR: function decimal5_0in(integer[]) does not exist
  1518. LINE 1: SELECT decimal5_0In(arrayIntVal) FROM srcTestTable LIMIT 1;
  1519. ^
  1520. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1521. SELECT decimal5_0In(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  1522. psql:implicitCasts.sql:398: ERROR: function decimal5_0in(double precision[]) does not exist
  1523. LINE 1: SELECT decimal5_0In(arrayDoubleVal) FROM srcTestTable LIMIT ...
  1524. ^
  1525. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1526. SELECT decimal5_0In(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  1527. psql:implicitCasts.sql:399: ERROR: function decimal5_0in(structintdoublety) does not exist
  1528. LINE 1: SELECT decimal5_0In(structIntDoubleVal) FROM srcTestTable LI...
  1529. ^
  1530. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1531. SELECT decimal5_0In(structStringIntVal) FROM srcTestTable LIMIT 1;
  1532. psql:implicitCasts.sql:400: ERROR: function decimal5_0in(structstringintty) does not exist
  1533. LINE 1: SELECT decimal5_0In(structStringIntVal) FROM srcTestTable LI...
  1534. ^
  1535. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1536. SELECT decimal5_0In(null);
  1537. decimal5_0in
  1538. --------------
  1539. NULL
  1540. (1 row)
  1541.  
  1542. -- from * to decimal(10, 0)
  1543. DROP FUNCTION IF EXISTS decimal10_0In;
  1544. DROP FUNCTION
  1545. CREATE FUNCTION decimal10_0In(decimal(10, 0)) RETURNS decimal(10, 0)
  1546. AS 'select $1;'
  1547. LANGUAGE SQL
  1548. IMMUTABLE
  1549. RETURNS NULL ON NULL INPUT;
  1550. CREATE FUNCTION
  1551. SELECT decimal10_0In(shortVal) FROM srcTestTable WHERE shortVal = 1;
  1552. decimal10_0in
  1553. ---------------
  1554. 1
  1555. (1 row)
  1556.  
  1557. SELECT decimal10_0In(intVal) FROM srcTestTable WHERE intVal = 1;
  1558. decimal10_0in
  1559. ---------------
  1560. 1
  1561. (1 row)
  1562.  
  1563. SELECT decimal10_0In(longVal) FROM srcTestTable WHERE longVal = 1;
  1564. decimal10_0in
  1565. ---------------
  1566. 1
  1567. (1 row)
  1568.  
  1569. SELECT decimal10_0In(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  1570. psql:implicitCasts.sql:414: ERROR: function decimal10_0in(double precision) does not exist
  1571. LINE 1: SELECT decimal10_0In(doubleVal) FROM srcTestTable WHERE doub...
  1572. ^
  1573. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1574. SELECT decimal10_0In(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  1575. psql:implicitCasts.sql:415: ERROR: function decimal10_0in(real) does not exist
  1576. LINE 1: SELECT decimal10_0In(floatVal) FROM srcTestTable WHERE float...
  1577. ^
  1578. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1579. SELECT decimal10_0In(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  1580. decimal10_0in
  1581. ---------------
  1582. 1
  1583. (1 row)
  1584.  
  1585. SELECT decimal10_0In(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  1586. decimal10_0in
  1587. ---------------
  1588. 1
  1589. (1 row)
  1590.  
  1591. SELECT decimal10_0In(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  1592. decimal10_0in
  1593. ---------------
  1594. 1.00
  1595. (1 row)
  1596.  
  1597. SELECT decimal10_0In(decimal20_0Val) FROM srcTestTable WHERE decimal20_0Val = 1;
  1598. decimal10_0in
  1599. ---------------
  1600. 1
  1601. (1 row)
  1602.  
  1603. SELECT decimal10_0In(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  1604. decimal10_0in
  1605. -------------------
  1606. 1.000000000000000
  1607. (1 row)
  1608.  
  1609. SELECT decimal10_0In(decimal14_7Val) FROM srcTestTable WHERE decimal14_7Val = 1;
  1610. decimal10_0in
  1611. ---------------
  1612. 1.0000000
  1613. (1 row)
  1614.  
  1615. SELECT decimal10_0In(binaryVal) FROM srcTestTable LIMIT 1;
  1616. psql:implicitCasts.sql:422: ERROR: function decimal10_0in(bytea) does not exist
  1617. LINE 1: SELECT decimal10_0In(binaryVal) FROM srcTestTable LIMIT 1;
  1618. ^
  1619. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1620. SELECT decimal10_0In(booleanVal) FROM srcTestTable LIMIT 1;
  1621. psql:implicitCasts.sql:423: ERROR: function decimal10_0in(boolean) does not exist
  1622. LINE 1: SELECT decimal10_0In(booleanVal) FROM srcTestTable LIMIT 1;
  1623. ^
  1624. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1625. SELECT decimal10_0In(stringVal) FROM srcTestTable LIMIT 1;
  1626. psql:implicitCasts.sql:424: ERROR: function decimal10_0in(text) does not exist
  1627. LINE 1: SELECT decimal10_0In(stringVal) FROM srcTestTable LIMIT 1;
  1628. ^
  1629. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1630. SELECT decimal10_0In(dateVal) FROM srcTestTable LIMIT 1;
  1631. psql:implicitCasts.sql:425: ERROR: function decimal10_0in(date) does not exist
  1632. LINE 1: SELECT decimal10_0In(dateVal) FROM srcTestTable LIMIT 1;
  1633. ^
  1634. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1635. SELECT decimal10_0In(timestampVal) FROM srcTestTable LIMIT 1;
  1636. psql:implicitCasts.sql:426: ERROR: function decimal10_0in(timestamp without time zone) does not exist
  1637. LINE 1: SELECT decimal10_0In(timestampVal) FROM srcTestTable LIMIT 1...
  1638. ^
  1639. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1640. SELECT decimal10_0In(arrayIntVal) FROM srcTestTable LIMIT 1;
  1641. psql:implicitCasts.sql:427: ERROR: function decimal10_0in(integer[]) does not exist
  1642. LINE 1: SELECT decimal10_0In(arrayIntVal) FROM srcTestTable LIMIT 1;
  1643. ^
  1644. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1645. SELECT decimal10_0In(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  1646. psql:implicitCasts.sql:428: ERROR: function decimal10_0in(double precision[]) does not exist
  1647. LINE 1: SELECT decimal10_0In(arrayDoubleVal) FROM srcTestTable LIMIT...
  1648. ^
  1649. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1650. SELECT decimal10_0In(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  1651. psql:implicitCasts.sql:429: ERROR: function decimal10_0in(structintdoublety) does not exist
  1652. LINE 1: SELECT decimal10_0In(structIntDoubleVal) FROM srcTestTable L...
  1653. ^
  1654. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1655. SELECT decimal10_0In(structStringIntVal) FROM srcTestTable LIMIT 1;
  1656. psql:implicitCasts.sql:430: ERROR: function decimal10_0in(structstringintty) does not exist
  1657. LINE 1: SELECT decimal10_0In(structStringIntVal) FROM srcTestTable L...
  1658. ^
  1659. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1660. SELECT decimal10_0In(null);
  1661. decimal10_0in
  1662. ---------------
  1663. NULL
  1664. (1 row)
  1665.  
  1666. -- from * to decimal(10, 2)
  1667. DROP FUNCTION IF EXISTS decimal10_2In;
  1668. DROP FUNCTION
  1669. CREATE FUNCTION decimal10_2In(decimal(10, 2)) RETURNS decimal(10, 2)
  1670. AS 'select $1;'
  1671. LANGUAGE SQL
  1672. IMMUTABLE
  1673. RETURNS NULL ON NULL INPUT;
  1674. CREATE FUNCTION
  1675. SELECT decimal10_2In(shortVal) FROM srcTestTable WHERE shortVal = 1;
  1676. decimal10_2in
  1677. ---------------
  1678. 1
  1679. (1 row)
  1680.  
  1681. SELECT decimal10_2In(intVal) FROM srcTestTable WHERE intVal = 1;
  1682. decimal10_2in
  1683. ---------------
  1684. 1
  1685. (1 row)
  1686.  
  1687. SELECT decimal10_2In(longVal) FROM srcTestTable WHERE longVal = 1;
  1688. decimal10_2in
  1689. ---------------
  1690. 1
  1691. (1 row)
  1692.  
  1693. SELECT decimal10_2In(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  1694. psql:implicitCasts.sql:444: ERROR: function decimal10_2in(double precision) does not exist
  1695. LINE 1: SELECT decimal10_2In(doubleVal) FROM srcTestTable WHERE doub...
  1696. ^
  1697. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1698. SELECT decimal10_2In(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  1699. psql:implicitCasts.sql:445: ERROR: function decimal10_2in(real) does not exist
  1700. LINE 1: SELECT decimal10_2In(floatVal) FROM srcTestTable WHERE float...
  1701. ^
  1702. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1703. SELECT decimal10_2In(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  1704. decimal10_2in
  1705. ---------------
  1706. 1
  1707. (1 row)
  1708.  
  1709. SELECT decimal10_2In(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  1710. decimal10_2in
  1711. ---------------
  1712. 1
  1713. (1 row)
  1714.  
  1715. SELECT decimal10_2In(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  1716. decimal10_2in
  1717. ---------------
  1718. 1
  1719. (1 row)
  1720.  
  1721. SELECT decimal10_2In(decimal20_0Val) FROM srcTestTable WHERE decimal20_0Val = 1;
  1722. decimal10_2in
  1723. ---------------
  1724. 1
  1725. (1 row)
  1726.  
  1727. SELECT decimal10_2In(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  1728. decimal10_2in
  1729. -------------------
  1730. 1.000000000000000
  1731. (1 row)
  1732.  
  1733. SELECT decimal10_2In(decimal14_7Val) FROM srcTestTable WHERE decimal14_7Val = 1;
  1734. decimal10_2in
  1735. ---------------
  1736. 1.0000000
  1737. (1 row)
  1738.  
  1739. SELECT decimal10_2In(binaryVal) FROM srcTestTable LIMIT 1;
  1740. psql:implicitCasts.sql:452: ERROR: function decimal10_2in(bytea) does not exist
  1741. LINE 1: SELECT decimal10_2In(binaryVal) FROM srcTestTable LIMIT 1;
  1742. ^
  1743. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1744. SELECT decimal10_2In(booleanVal) FROM srcTestTable LIMIT 1;
  1745. psql:implicitCasts.sql:453: ERROR: function decimal10_2in(boolean) does not exist
  1746. LINE 1: SELECT decimal10_2In(booleanVal) FROM srcTestTable LIMIT 1;
  1747. ^
  1748. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1749. SELECT decimal10_2In(stringVal) FROM srcTestTable LIMIT 1;
  1750. psql:implicitCasts.sql:454: ERROR: function decimal10_2in(text) does not exist
  1751. LINE 1: SELECT decimal10_2In(stringVal) FROM srcTestTable LIMIT 1;
  1752. ^
  1753. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1754. SELECT decimal10_2In(dateVal) FROM srcTestTable LIMIT 1;
  1755. psql:implicitCasts.sql:455: ERROR: function decimal10_2in(date) does not exist
  1756. LINE 1: SELECT decimal10_2In(dateVal) FROM srcTestTable LIMIT 1;
  1757. ^
  1758. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1759. SELECT decimal10_2In(timestampVal) FROM srcTestTable LIMIT 1;
  1760. psql:implicitCasts.sql:456: ERROR: function decimal10_2in(timestamp without time zone) does not exist
  1761. LINE 1: SELECT decimal10_2In(timestampVal) FROM srcTestTable LIMIT 1...
  1762. ^
  1763. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1764. SELECT decimal10_2In(arrayIntVal) FROM srcTestTable LIMIT 1;
  1765. psql:implicitCasts.sql:457: ERROR: function decimal10_2in(integer[]) does not exist
  1766. LINE 1: SELECT decimal10_2In(arrayIntVal) FROM srcTestTable LIMIT 1;
  1767. ^
  1768. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1769. SELECT decimal10_2In(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  1770. psql:implicitCasts.sql:458: ERROR: function decimal10_2in(double precision[]) does not exist
  1771. LINE 1: SELECT decimal10_2In(arrayDoubleVal) FROM srcTestTable LIMIT...
  1772. ^
  1773. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1774. SELECT decimal10_2In(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  1775. psql:implicitCasts.sql:459: ERROR: function decimal10_2in(structintdoublety) does not exist
  1776. LINE 1: SELECT decimal10_2In(structIntDoubleVal) FROM srcTestTable L...
  1777. ^
  1778. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1779. SELECT decimal10_2In(structStringIntVal) FROM srcTestTable LIMIT 1;
  1780. psql:implicitCasts.sql:460: ERROR: function decimal10_2in(structstringintty) does not exist
  1781. LINE 1: SELECT decimal10_2In(structStringIntVal) FROM srcTestTable L...
  1782. ^
  1783. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1784. SELECT decimal10_2In(null);
  1785. decimal10_2in
  1786. ---------------
  1787. NULL
  1788. (1 row)
  1789.  
  1790. -- from * to decimal(20, 0)
  1791. DROP FUNCTION IF EXISTS decimal20_0In;
  1792. DROP FUNCTION
  1793. CREATE FUNCTION decimal20_0In(decimal(20, 0)) RETURNS decimal(20, 0)
  1794. AS 'select $1;'
  1795. LANGUAGE SQL
  1796. IMMUTABLE
  1797. RETURNS NULL ON NULL INPUT;
  1798. CREATE FUNCTION
  1799. SELECT decimal20_0In(shortVal) FROM srcTestTable WHERE shortVal = 1;
  1800. decimal20_0in
  1801. ---------------
  1802. 1
  1803. (1 row)
  1804.  
  1805. SELECT decimal20_0In(intVal) FROM srcTestTable WHERE intVal = 1;
  1806. decimal20_0in
  1807. ---------------
  1808. 1
  1809. (1 row)
  1810.  
  1811. SELECT decimal20_0In(longVal) FROM srcTestTable WHERE longVal = 1;
  1812. decimal20_0in
  1813. ---------------
  1814. 1
  1815. (1 row)
  1816.  
  1817. SELECT decimal20_0In(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  1818. psql:implicitCasts.sql:474: ERROR: function decimal20_0in(double precision) does not exist
  1819. LINE 1: SELECT decimal20_0In(doubleVal) FROM srcTestTable WHERE doub...
  1820. ^
  1821. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1822. SELECT decimal20_0In(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  1823. psql:implicitCasts.sql:475: ERROR: function decimal20_0in(real) does not exist
  1824. LINE 1: SELECT decimal20_0In(floatVal) FROM srcTestTable WHERE float...
  1825. ^
  1826. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1827. SELECT decimal20_0In(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  1828. decimal20_0in
  1829. ---------------
  1830. 1
  1831. (1 row)
  1832.  
  1833. SELECT decimal20_0In(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  1834. decimal20_0in
  1835. ---------------
  1836. 1
  1837. (1 row)
  1838.  
  1839. SELECT decimal20_0In(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  1840. decimal20_0in
  1841. ---------------
  1842. 1
  1843. (1 row)
  1844.  
  1845. SELECT decimal20_0In(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  1846. decimal20_0in
  1847. ---------------
  1848. 1.00
  1849. (1 row)
  1850.  
  1851. SELECT decimal20_0In(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  1852. decimal20_0in
  1853. -------------------
  1854. 1.000000000000000
  1855. (1 row)
  1856.  
  1857. SELECT decimal20_0In(decimal14_7Val) FROM srcTestTable WHERE decimal14_7Val = 1;
  1858. decimal20_0in
  1859. ---------------
  1860. 1.0000000
  1861. (1 row)
  1862.  
  1863. SELECT decimal20_0In(binaryVal) FROM srcTestTable LIMIT 1;
  1864. psql:implicitCasts.sql:482: ERROR: function decimal20_0in(bytea) does not exist
  1865. LINE 1: SELECT decimal20_0In(binaryVal) FROM srcTestTable LIMIT 1;
  1866. ^
  1867. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1868. SELECT decimal20_0In(booleanVal) FROM srcTestTable LIMIT 1;
  1869. psql:implicitCasts.sql:483: ERROR: function decimal20_0in(boolean) does not exist
  1870. LINE 1: SELECT decimal20_0In(booleanVal) FROM srcTestTable LIMIT 1;
  1871. ^
  1872. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1873. SELECT decimal20_0In(stringVal) FROM srcTestTable LIMIT 1;
  1874. psql:implicitCasts.sql:484: ERROR: function decimal20_0in(text) does not exist
  1875. LINE 1: SELECT decimal20_0In(stringVal) FROM srcTestTable LIMIT 1;
  1876. ^
  1877. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1878. SELECT decimal20_0In(dateVal) FROM srcTestTable LIMIT 1;
  1879. psql:implicitCasts.sql:485: ERROR: function decimal20_0in(date) does not exist
  1880. LINE 1: SELECT decimal20_0In(dateVal) FROM srcTestTable LIMIT 1;
  1881. ^
  1882. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1883. SELECT decimal20_0In(timestampVal) FROM srcTestTable LIMIT 1;
  1884. psql:implicitCasts.sql:486: ERROR: function decimal20_0in(timestamp without time zone) does not exist
  1885. LINE 1: SELECT decimal20_0In(timestampVal) FROM srcTestTable LIMIT 1...
  1886. ^
  1887. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1888. SELECT decimal20_0In(arrayIntVal) FROM srcTestTable LIMIT 1;
  1889. psql:implicitCasts.sql:487: ERROR: function decimal20_0in(integer[]) does not exist
  1890. LINE 1: SELECT decimal20_0In(arrayIntVal) FROM srcTestTable LIMIT 1;
  1891. ^
  1892. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1893. SELECT decimal20_0In(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  1894. psql:implicitCasts.sql:488: ERROR: function decimal20_0in(double precision[]) does not exist
  1895. LINE 1: SELECT decimal20_0In(arrayDoubleVal) FROM srcTestTable LIMIT...
  1896. ^
  1897. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1898. SELECT decimal20_0In(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  1899. psql:implicitCasts.sql:489: ERROR: function decimal20_0in(structintdoublety) does not exist
  1900. LINE 1: SELECT decimal20_0In(structIntDoubleVal) FROM srcTestTable L...
  1901. ^
  1902. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1903. SELECT decimal20_0In(structStringIntVal) FROM srcTestTable LIMIT 1;
  1904. psql:implicitCasts.sql:490: ERROR: function decimal20_0in(structstringintty) does not exist
  1905. LINE 1: SELECT decimal20_0In(structStringIntVal) FROM srcTestTable L...
  1906. ^
  1907. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1908. SELECT decimal20_0In(null);
  1909. decimal20_0in
  1910. ---------------
  1911. NULL
  1912. (1 row)
  1913.  
  1914. -- from * to decimal(30, 15)
  1915. DROP FUNCTION IF EXISTS decimal30_15In;
  1916. DROP FUNCTION
  1917. CREATE FUNCTION decimal30_15In(decimal(30, 15)) RETURNS decimal(30, 15)
  1918. AS 'select $1;'
  1919. LANGUAGE SQL
  1920. IMMUTABLE
  1921. RETURNS NULL ON NULL INPUT;
  1922. CREATE FUNCTION
  1923. SELECT decimal30_15In(shortVal) FROM srcTestTable WHERE shortVal = 1;
  1924. decimal30_15in
  1925. ----------------
  1926. 1
  1927. (1 row)
  1928.  
  1929. SELECT decimal30_15In(intVal) FROM srcTestTable WHERE intVal = 1;
  1930. decimal30_15in
  1931. ----------------
  1932. 1
  1933. (1 row)
  1934.  
  1935. SELECT decimal30_15In(longVal) FROM srcTestTable WHERE longVal = 1;
  1936. decimal30_15in
  1937. ----------------
  1938. 1
  1939. (1 row)
  1940.  
  1941. SELECT decimal30_15In(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  1942. psql:implicitCasts.sql:504: ERROR: function decimal30_15in(double precision) does not exist
  1943. LINE 1: SELECT decimal30_15In(doubleVal) FROM srcTestTable WHERE dou...
  1944. ^
  1945. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1946. SELECT decimal30_15In(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  1947. psql:implicitCasts.sql:505: ERROR: function decimal30_15in(real) does not exist
  1948. LINE 1: SELECT decimal30_15In(floatVal) FROM srcTestTable WHERE floa...
  1949. ^
  1950. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1951. SELECT decimal30_15In(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  1952. decimal30_15in
  1953. ----------------
  1954. 1
  1955. (1 row)
  1956.  
  1957. SELECT decimal30_15In(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  1958. decimal30_15in
  1959. ----------------
  1960. 1
  1961. (1 row)
  1962.  
  1963. SELECT decimal30_15In(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  1964. decimal30_15in
  1965. ----------------
  1966. 1
  1967. (1 row)
  1968.  
  1969. SELECT decimal30_15In(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  1970. decimal30_15in
  1971. ----------------
  1972. 1.00
  1973. (1 row)
  1974.  
  1975. SELECT decimal30_15In(decimal14_7Val) FROM srcTestTable WHERE decimal14_7Val = 1;
  1976. decimal30_15in
  1977. ----------------
  1978. 1.0000000
  1979. (1 row)
  1980.  
  1981. SELECT decimal30_15In(binaryVal) FROM srcTestTable LIMIT 1;
  1982. psql:implicitCasts.sql:511: ERROR: function decimal30_15in(bytea) does not exist
  1983. LINE 1: SELECT decimal30_15In(binaryVal) FROM srcTestTable LIMIT 1;
  1984. ^
  1985. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1986. SELECT decimal30_15In(booleanVal) FROM srcTestTable LIMIT 1;
  1987. psql:implicitCasts.sql:512: ERROR: function decimal30_15in(boolean) does not exist
  1988. LINE 1: SELECT decimal30_15In(booleanVal) FROM srcTestTable LIMIT 1;
  1989. ^
  1990. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1991. SELECT decimal30_15In(stringVal) FROM srcTestTable LIMIT 1;
  1992. psql:implicitCasts.sql:513: ERROR: function decimal30_15in(text) does not exist
  1993. LINE 1: SELECT decimal30_15In(stringVal) FROM srcTestTable LIMIT 1;
  1994. ^
  1995. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  1996. SELECT decimal30_15In(dateVal) FROM srcTestTable LIMIT 1;
  1997. psql:implicitCasts.sql:514: ERROR: function decimal30_15in(date) does not exist
  1998. LINE 1: SELECT decimal30_15In(dateVal) FROM srcTestTable LIMIT 1;
  1999. ^
  2000. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2001. SELECT decimal30_15In(timestampVal) FROM srcTestTable LIMIT 1;
  2002. psql:implicitCasts.sql:515: ERROR: function decimal30_15in(timestamp without time zone) does not exist
  2003. LINE 1: SELECT decimal30_15In(timestampVal) FROM srcTestTable LIMIT ...
  2004. ^
  2005. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2006. SELECT decimal30_15In(arrayIntVal) FROM srcTestTable LIMIT 1;
  2007. psql:implicitCasts.sql:516: ERROR: function decimal30_15in(integer[]) does not exist
  2008. LINE 1: SELECT decimal30_15In(arrayIntVal) FROM srcTestTable LIMIT 1...
  2009. ^
  2010. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2011. SELECT decimal30_15In(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2012. psql:implicitCasts.sql:517: ERROR: function decimal30_15in(double precision[]) does not exist
  2013. LINE 1: SELECT decimal30_15In(arrayDoubleVal) FROM srcTestTable LIMI...
  2014. ^
  2015. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2016. SELECT decimal30_15In(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  2017. psql:implicitCasts.sql:518: ERROR: function decimal30_15in(structintdoublety) does not exist
  2018. LINE 1: SELECT decimal30_15In(structIntDoubleVal) FROM srcTestTable ...
  2019. ^
  2020. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2021. SELECT decimal30_15In(structStringIntVal) FROM srcTestTable LIMIT 1;
  2022. psql:implicitCasts.sql:519: ERROR: function decimal30_15in(structstringintty) does not exist
  2023. LINE 1: SELECT decimal30_15In(structStringIntVal) FROM srcTestTable ...
  2024. ^
  2025. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2026. SELECT decimal30_15In(null);
  2027. decimal30_15in
  2028. ----------------
  2029. NULL
  2030. (1 row)
  2031.  
  2032. -- from * to decimal(14, 7)
  2033. DROP FUNCTION IF EXISTS decimal14_7In;
  2034. DROP FUNCTION
  2035. CREATE FUNCTION decimal14_7In(decimal(14, 7)) RETURNS decimal(14, 7)
  2036. AS 'select $1;'
  2037. LANGUAGE SQL
  2038. IMMUTABLE
  2039. RETURNS NULL ON NULL INPUT;
  2040. CREATE FUNCTION
  2041. SELECT decimal14_7In(shortVal) FROM srcTestTable WHERE shortVal = 1;
  2042. decimal14_7in
  2043. ---------------
  2044. 1
  2045. (1 row)
  2046.  
  2047. SELECT decimal14_7In(intVal) FROM srcTestTable WHERE intVal = 1;
  2048. decimal14_7in
  2049. ---------------
  2050. 1
  2051. (1 row)
  2052.  
  2053. SELECT decimal14_7In(longVal) FROM srcTestTable WHERE longVal = 1;
  2054. decimal14_7in
  2055. ---------------
  2056. 1
  2057. (1 row)
  2058.  
  2059. SELECT decimal14_7In(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  2060. psql:implicitCasts.sql:533: ERROR: function decimal14_7in(double precision) does not exist
  2061. LINE 1: SELECT decimal14_7In(doubleVal) FROM srcTestTable WHERE doub...
  2062. ^
  2063. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2064. SELECT decimal14_7In(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  2065. psql:implicitCasts.sql:534: ERROR: function decimal14_7in(real) does not exist
  2066. LINE 1: SELECT decimal14_7In(floatVal) FROM srcTestTable WHERE float...
  2067. ^
  2068. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2069. SELECT decimal14_7In(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  2070. decimal14_7in
  2071. ---------------
  2072. 1
  2073. (1 row)
  2074.  
  2075. SELECT decimal14_7In(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  2076. decimal14_7in
  2077. ---------------
  2078. 1
  2079. (1 row)
  2080.  
  2081. SELECT decimal14_7In(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  2082. decimal14_7in
  2083. ---------------
  2084. 1
  2085. (1 row)
  2086.  
  2087. SELECT decimal14_7In(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  2088. decimal14_7in
  2089. -------------------
  2090. 1.000000000000000
  2091. (1 row)
  2092.  
  2093. SELECT decimal14_7In(decimal30_15Val::decimal(14, 7)) FROM srcTestTable WHERE decimal30_15Val = 1;
  2094. decimal14_7in
  2095. ---------------
  2096. 1.0000000
  2097. (1 row)
  2098.  
  2099. SELECT decimal14_7In(binaryVal) FROM srcTestTable LIMIT 1;
  2100. psql:implicitCasts.sql:540: ERROR: function decimal14_7in(bytea) does not exist
  2101. LINE 1: SELECT decimal14_7In(binaryVal) FROM srcTestTable LIMIT 1;
  2102. ^
  2103. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2104. SELECT decimal14_7In(booleanVal) FROM srcTestTable LIMIT 1;
  2105. psql:implicitCasts.sql:541: ERROR: function decimal14_7in(boolean) does not exist
  2106. LINE 1: SELECT decimal14_7In(booleanVal) FROM srcTestTable LIMIT 1;
  2107. ^
  2108. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2109. SELECT decimal14_7In(stringVal) FROM srcTestTable LIMIT 1;
  2110. psql:implicitCasts.sql:542: ERROR: function decimal14_7in(text) does not exist
  2111. LINE 1: SELECT decimal14_7In(stringVal) FROM srcTestTable LIMIT 1;
  2112. ^
  2113. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2114. SELECT decimal14_7In(dateVal) FROM srcTestTable LIMIT 1;
  2115. psql:implicitCasts.sql:543: ERROR: function decimal14_7in(date) does not exist
  2116. LINE 1: SELECT decimal14_7In(dateVal) FROM srcTestTable LIMIT 1;
  2117. ^
  2118. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2119. SELECT decimal14_7In(timestampVal) FROM srcTestTable LIMIT 1;
  2120. psql:implicitCasts.sql:544: ERROR: function decimal14_7in(timestamp without time zone) does not exist
  2121. LINE 1: SELECT decimal14_7In(timestampVal) FROM srcTestTable LIMIT 1...
  2122. ^
  2123. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2124. SELECT decimal14_7In(arrayIntVal) FROM srcTestTable LIMIT 1;
  2125. psql:implicitCasts.sql:545: ERROR: function decimal14_7in(integer[]) does not exist
  2126. LINE 1: SELECT decimal14_7In(arrayIntVal) FROM srcTestTable LIMIT 1;
  2127. ^
  2128. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2129. SELECT decimal14_7In(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2130. psql:implicitCasts.sql:546: ERROR: function decimal14_7in(double precision[]) does not exist
  2131. LINE 1: SELECT decimal14_7In(arrayDoubleVal) FROM srcTestTable LIMIT...
  2132. ^
  2133. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2134. SELECT decimal14_7In(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  2135. psql:implicitCasts.sql:547: ERROR: function decimal14_7in(structintdoublety) does not exist
  2136. LINE 1: SELECT decimal14_7In(structIntDoubleVal) FROM srcTestTable L...
  2137. ^
  2138. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2139. SELECT decimal14_7In(structStringIntVal) FROM srcTestTable LIMIT 1;
  2140. psql:implicitCasts.sql:548: ERROR: function decimal14_7in(structstringintty) does not exist
  2141. LINE 1: SELECT decimal14_7In(structStringIntVal) FROM srcTestTable L...
  2142. ^
  2143. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2144. SELECT decimal14_7In(null);
  2145. decimal14_7in
  2146. ---------------
  2147. NULL
  2148. (1 row)
  2149.  
  2150. -- from * to binary
  2151. DROP FUNCTION IF EXISTS binaryIn;
  2152. DROP FUNCTION
  2153. CREATE FUNCTION binaryIn(bytea) RETURNS bytea
  2154. AS 'select $1;'
  2155. LANGUAGE SQL
  2156. IMMUTABLE
  2157. RETURNS NULL ON NULL INPUT;
  2158. CREATE FUNCTION
  2159. SELECT binaryIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  2160. psql:implicitCasts.sql:559: ERROR: function binaryin(smallint) does not exist
  2161. LINE 1: SELECT binaryIn(shortVal) FROM srcTestTable WHERE shortVal =...
  2162. ^
  2163. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2164. SELECT binaryIn(intVal) FROM srcTestTable WHERE intVal = 1;
  2165. psql:implicitCasts.sql:560: ERROR: function binaryin(integer) does not exist
  2166. LINE 1: SELECT binaryIn(intVal) FROM srcTestTable WHERE intVal = 1;
  2167. ^
  2168. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2169. SELECT binaryIn(longVal) FROM srcTestTable WHERE longVal = 1;
  2170. psql:implicitCasts.sql:561: ERROR: function binaryin(bigint) does not exist
  2171. LINE 1: SELECT binaryIn(longVal) FROM srcTestTable WHERE longVal = 1...
  2172. ^
  2173. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2174. SELECT binaryIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  2175. psql:implicitCasts.sql:562: ERROR: function binaryin(double precision) does not exist
  2176. LINE 1: SELECT binaryIn(doubleVal) FROM srcTestTable WHERE doubleVal...
  2177. ^
  2178. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2179. SELECT binaryIn(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  2180. psql:implicitCasts.sql:563: ERROR: function binaryin(real) does not exist
  2181. LINE 1: SELECT binaryIn(floatVal) FROM srcTestTable WHERE floatVal< ...
  2182. ^
  2183. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2184. SELECT binaryIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  2185. psql:implicitCasts.sql:564: ERROR: function binaryin(numeric) does not exist
  2186. LINE 1: SELECT binaryIn(decimal3_0Val) FROM srcTestTable WHERE decim...
  2187. ^
  2188. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2189. SELECT binaryIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  2190. psql:implicitCasts.sql:565: ERROR: function binaryin(numeric) does not exist
  2191. LINE 1: SELECT binaryIn(decimal5_0Val) FROM srcTestTable WHERE decim...
  2192. ^
  2193. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2194. SELECT binaryIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  2195. psql:implicitCasts.sql:566: ERROR: function binaryin(numeric) does not exist
  2196. LINE 1: SELECT binaryIn(decimal10_0Val) FROM srcTestTable WHERE deci...
  2197. ^
  2198. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2199. SELECT binaryIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  2200. psql:implicitCasts.sql:567: ERROR: function binaryin(numeric) does not exist
  2201. LINE 1: SELECT binaryIn(decimal10_2Val) FROM srcTestTable WHERE deci...
  2202. ^
  2203. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2204. SELECT binaryIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  2205. psql:implicitCasts.sql:568: ERROR: function binaryin(numeric) does not exist
  2206. LINE 1: SELECT binaryIn(decimal30_15Val) FROM srcTestTable WHERE dec...
  2207. ^
  2208. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2209. SELECT binaryIn(decimal14_7In) FROM srcTestTable WHERE decimal30_15Val = 1;
  2210. psql:implicitCasts.sql:569: ERROR: column "decimal14_7in" does not exist
  2211. LINE 1: SELECT binaryIn(decimal14_7In) FROM srcTestTable WHERE decim...
  2212. ^
  2213. HINT: Perhaps you meant to reference the column "srctesttable.decimal14_7val".
  2214. SELECT binaryIn(booleanVal) FROM srcTestTable LIMIT 1;
  2215. psql:implicitCasts.sql:570: ERROR: function binaryin(boolean) does not exist
  2216. LINE 1: SELECT binaryIn(booleanVal) FROM srcTestTable LIMIT 1;
  2217. ^
  2218. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2219. SELECT binaryIn(stringVal) FROM srcTestTable LIMIT 1;
  2220. psql:implicitCasts.sql:571: ERROR: function binaryin(text) does not exist
  2221. LINE 1: SELECT binaryIn(stringVal) FROM srcTestTable LIMIT 1;
  2222. ^
  2223. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2224. SELECT binaryIn(dateVal) FROM srcTestTable LIMIT 1;
  2225. psql:implicitCasts.sql:572: ERROR: function binaryin(date) does not exist
  2226. LINE 1: SELECT binaryIn(dateVal) FROM srcTestTable LIMIT 1;
  2227. ^
  2228. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2229. SELECT binaryIn(timestampVal) FROM srcTestTable LIMIT 1;
  2230. psql:implicitCasts.sql:573: ERROR: function binaryin(timestamp without time zone) does not exist
  2231. LINE 1: SELECT binaryIn(timestampVal) FROM srcTestTable LIMIT 1;
  2232. ^
  2233. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2234. SELECT binaryIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  2235. psql:implicitCasts.sql:574: ERROR: function binaryin(integer[]) does not exist
  2236. LINE 1: SELECT binaryIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  2237. ^
  2238. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2239. SELECT binaryIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2240. psql:implicitCasts.sql:575: ERROR: function binaryin(double precision[]) does not exist
  2241. LINE 1: SELECT binaryIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2242. ^
  2243. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2244. SELECT binaryIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  2245. psql:implicitCasts.sql:576: ERROR: function binaryin(structintdoublety) does not exist
  2246. LINE 1: SELECT binaryIn(structIntDoubleVal) FROM srcTestTable LIMIT ...
  2247. ^
  2248. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2249. SELECT binaryIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  2250. psql:implicitCasts.sql:577: ERROR: function binaryin(structstringintty) does not exist
  2251. LINE 1: SELECT binaryIn(structStringIntVal) FROM srcTestTable LIMIT ...
  2252. ^
  2253. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2254. SELECT binaryIn(null);
  2255. binaryin
  2256. ----------
  2257. NULL
  2258. (1 row)
  2259.  
  2260. -- from * to boolean
  2261. DROP FUNCTION IF EXISTS booleanIn;
  2262. DROP FUNCTION
  2263. CREATE FUNCTION booleanIn(boolean) RETURNS boolean
  2264. AS 'select $1;'
  2265. LANGUAGE SQL
  2266. IMMUTABLE
  2267. RETURNS NULL ON NULL INPUT;
  2268. CREATE FUNCTION
  2269. SELECT booleanIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  2270. psql:implicitCasts.sql:588: ERROR: function booleanin(smallint) does not exist
  2271. LINE 1: SELECT booleanIn(shortVal) FROM srcTestTable WHERE shortVal ...
  2272. ^
  2273. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2274. SELECT booleanIn(intVal) FROM srcTestTable WHERE intVal = 1;
  2275. psql:implicitCasts.sql:589: ERROR: function booleanin(integer) does not exist
  2276. LINE 1: SELECT booleanIn(intVal) FROM srcTestTable WHERE intVal = 1;
  2277. ^
  2278. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2279. SELECT booleanIn(longVal) FROM srcTestTable WHERE longVal = 1;
  2280. psql:implicitCasts.sql:590: ERROR: function booleanin(bigint) does not exist
  2281. LINE 1: SELECT booleanIn(longVal) FROM srcTestTable WHERE longVal = ...
  2282. ^
  2283. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2284. SELECT booleanIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  2285. psql:implicitCasts.sql:591: ERROR: function booleanin(double precision) does not exist
  2286. LINE 1: SELECT booleanIn(doubleVal) FROM srcTestTable WHERE doubleVa...
  2287. ^
  2288. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2289. SELECT booleanIn(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  2290. psql:implicitCasts.sql:592: ERROR: function booleanin(real) does not exist
  2291. LINE 1: SELECT booleanIn(floatVal) FROM srcTestTable WHERE floatVal<...
  2292. ^
  2293. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2294. SELECT booleanIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  2295. psql:implicitCasts.sql:593: ERROR: function booleanin(numeric) does not exist
  2296. LINE 1: SELECT booleanIn(decimal3_0Val) FROM srcTestTable WHERE deci...
  2297. ^
  2298. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2299. SELECT booleanIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  2300. psql:implicitCasts.sql:594: ERROR: function booleanin(numeric) does not exist
  2301. LINE 1: SELECT booleanIn(decimal5_0Val) FROM srcTestTable WHERE deci...
  2302. ^
  2303. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2304. SELECT booleanIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  2305. psql:implicitCasts.sql:595: ERROR: function booleanin(numeric) does not exist
  2306. LINE 1: SELECT booleanIn(decimal10_0Val) FROM srcTestTable WHERE dec...
  2307. ^
  2308. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2309. SELECT booleanIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  2310. psql:implicitCasts.sql:596: ERROR: function booleanin(numeric) does not exist
  2311. LINE 1: SELECT booleanIn(decimal10_2Val) FROM srcTestTable WHERE dec...
  2312. ^
  2313. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2314. SELECT booleanIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  2315. psql:implicitCasts.sql:597: ERROR: function booleanin(numeric) does not exist
  2316. LINE 1: SELECT booleanIn(decimal30_15Val) FROM srcTestTable WHERE de...
  2317. ^
  2318. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2319. SELECT booleanIn(decimal14_7In) FROM srcTestTable WHERE decimal30_15Val = 1;
  2320. psql:implicitCasts.sql:598: ERROR: column "decimal14_7in" does not exist
  2321. LINE 1: SELECT booleanIn(decimal14_7In) FROM srcTestTable WHERE deci...
  2322. ^
  2323. HINT: Perhaps you meant to reference the column "srctesttable.decimal14_7val".
  2324. SELECT booleanIn(binaryVal) FROM srcTestTable LIMIT 1;
  2325. psql:implicitCasts.sql:599: ERROR: function booleanin(bytea) does not exist
  2326. LINE 1: SELECT booleanIn(binaryVal) FROM srcTestTable LIMIT 1;
  2327. ^
  2328. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2329. SELECT booleanIn(stringVal) FROM srcTestTable LIMIT 1;
  2330. psql:implicitCasts.sql:600: ERROR: function booleanin(text) does not exist
  2331. LINE 1: SELECT booleanIn(stringVal) FROM srcTestTable LIMIT 1;
  2332. ^
  2333. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2334. SELECT booleanIn(dateVal) FROM srcTestTable LIMIT 1;
  2335. psql:implicitCasts.sql:601: ERROR: function booleanin(date) does not exist
  2336. LINE 1: SELECT booleanIn(dateVal) FROM srcTestTable LIMIT 1;
  2337. ^
  2338. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2339. SELECT booleanIn(timestampVal) FROM srcTestTable LIMIT 1;
  2340. psql:implicitCasts.sql:602: ERROR: function booleanin(timestamp without time zone) does not exist
  2341. LINE 1: SELECT booleanIn(timestampVal) FROM srcTestTable LIMIT 1;
  2342. ^
  2343. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2344. SELECT booleanIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  2345. psql:implicitCasts.sql:603: ERROR: function booleanin(integer[]) does not exist
  2346. LINE 1: SELECT booleanIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  2347. ^
  2348. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2349. SELECT booleanIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2350. psql:implicitCasts.sql:604: ERROR: function booleanin(double precision[]) does not exist
  2351. LINE 1: SELECT booleanIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2352. ^
  2353. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2354. SELECT booleanIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  2355. psql:implicitCasts.sql:605: ERROR: function booleanin(structintdoublety) does not exist
  2356. LINE 1: SELECT booleanIn(structIntDoubleVal) FROM srcTestTable LIMIT...
  2357. ^
  2358. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2359. SELECT booleanIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  2360. psql:implicitCasts.sql:606: ERROR: function booleanin(structstringintty) does not exist
  2361. LINE 1: SELECT booleanIn(structStringIntVal) FROM srcTestTable LIMIT...
  2362. ^
  2363. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2364. SELECT booleanIn(null);
  2365. booleanin
  2366. -----------
  2367. NULL
  2368. (1 row)
  2369.  
  2370. -- from * to string
  2371. DROP FUNCTION IF EXISTS stringIn;
  2372. DROP FUNCTION
  2373. CREATE FUNCTION stringIn(text) RETURNS text
  2374. AS 'select $1;'
  2375. LANGUAGE SQL
  2376. IMMUTABLE
  2377. RETURNS NULL ON NULL INPUT;
  2378. CREATE FUNCTION
  2379. SELECT stringIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  2380. psql:implicitCasts.sql:617: ERROR: function stringin(smallint) does not exist
  2381. LINE 1: SELECT stringIn(shortVal) FROM srcTestTable WHERE shortVal =...
  2382. ^
  2383. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2384. SELECT stringIn(intVal) FROM srcTestTable WHERE intVal = 1;
  2385. psql:implicitCasts.sql:618: ERROR: function stringin(integer) does not exist
  2386. LINE 1: SELECT stringIn(intVal) FROM srcTestTable WHERE intVal = 1;
  2387. ^
  2388. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2389. SELECT stringIn(longVal) FROM srcTestTable WHERE longVal = 1;
  2390. psql:implicitCasts.sql:619: ERROR: function stringin(bigint) does not exist
  2391. LINE 1: SELECT stringIn(longVal) FROM srcTestTable WHERE longVal = 1...
  2392. ^
  2393. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2394. SELECT stringIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  2395. psql:implicitCasts.sql:620: ERROR: function stringin(double precision) does not exist
  2396. LINE 1: SELECT stringIn(doubleVal) FROM srcTestTable WHERE doubleVal...
  2397. ^
  2398. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2399. SELECT stringIn(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  2400. psql:implicitCasts.sql:621: ERROR: function stringin(real) does not exist
  2401. LINE 1: SELECT stringIn(floatVal) FROM srcTestTable WHERE floatVal< ...
  2402. ^
  2403. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2404. SELECT stringIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  2405. psql:implicitCasts.sql:622: ERROR: function stringin(numeric) does not exist
  2406. LINE 1: SELECT stringIn(decimal3_0Val) FROM srcTestTable WHERE decim...
  2407. ^
  2408. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2409. SELECT stringIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  2410. psql:implicitCasts.sql:623: ERROR: function stringin(numeric) does not exist
  2411. LINE 1: SELECT stringIn(decimal5_0Val) FROM srcTestTable WHERE decim...
  2412. ^
  2413. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2414. SELECT stringIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  2415. psql:implicitCasts.sql:624: ERROR: function stringin(numeric) does not exist
  2416. LINE 1: SELECT stringIn(decimal10_0Val) FROM srcTestTable WHERE deci...
  2417. ^
  2418. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2419. SELECT stringIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  2420. psql:implicitCasts.sql:625: ERROR: function stringin(numeric) does not exist
  2421. LINE 1: SELECT stringIn(decimal10_2Val) FROM srcTestTable WHERE deci...
  2422. ^
  2423. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2424. SELECT stringIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  2425. psql:implicitCasts.sql:626: ERROR: function stringin(numeric) does not exist
  2426. LINE 1: SELECT stringIn(decimal30_15Val) FROM srcTestTable WHERE dec...
  2427. ^
  2428. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2429. SELECT stringIn(decimal14_7In) FROM srcTestTable WHERE decimal30_15Val = 1;
  2430. psql:implicitCasts.sql:627: ERROR: column "decimal14_7in" does not exist
  2431. LINE 1: SELECT stringIn(decimal14_7In) FROM srcTestTable WHERE decim...
  2432. ^
  2433. HINT: Perhaps you meant to reference the column "srctesttable.decimal14_7val".
  2434. SELECT stringIn(binaryVal) FROM srcTestTable LIMIT 1;
  2435. psql:implicitCasts.sql:628: ERROR: function stringin(bytea) does not exist
  2436. LINE 1: SELECT stringIn(binaryVal) FROM srcTestTable LIMIT 1;
  2437. ^
  2438. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2439. SELECT stringIn(booleanVal) FROM srcTestTable LIMIT 1;
  2440. psql:implicitCasts.sql:629: ERROR: function stringin(boolean) does not exist
  2441. LINE 1: SELECT stringIn(booleanVal) FROM srcTestTable LIMIT 1;
  2442. ^
  2443. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2444. SELECT stringIn(dateVal) FROM srcTestTable LIMIT 1;
  2445. psql:implicitCasts.sql:630: ERROR: function stringin(date) does not exist
  2446. LINE 1: SELECT stringIn(dateVal) FROM srcTestTable LIMIT 1;
  2447. ^
  2448. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2449. SELECT stringIn(timestampVal) FROM srcTestTable LIMIT 1;
  2450. psql:implicitCasts.sql:631: ERROR: function stringin(timestamp without time zone) does not exist
  2451. LINE 1: SELECT stringIn(timestampVal) FROM srcTestTable LIMIT 1;
  2452. ^
  2453. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2454. SELECT stringIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  2455. psql:implicitCasts.sql:632: ERROR: function stringin(integer[]) does not exist
  2456. LINE 1: SELECT stringIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  2457. ^
  2458. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2459. SELECT stringIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2460. psql:implicitCasts.sql:633: ERROR: function stringin(double precision[]) does not exist
  2461. LINE 1: SELECT stringIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2462. ^
  2463. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2464. SELECT stringIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  2465. psql:implicitCasts.sql:634: ERROR: function stringin(structintdoublety) does not exist
  2466. LINE 1: SELECT stringIn(structIntDoubleVal) FROM srcTestTable LIMIT ...
  2467. ^
  2468. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2469. SELECT stringIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  2470. psql:implicitCasts.sql:635: ERROR: function stringin(structstringintty) does not exist
  2471. LINE 1: SELECT stringIn(structStringIntVal) FROM srcTestTable LIMIT ...
  2472. ^
  2473. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2474. SELECT stringIn(null);
  2475. stringin
  2476. ----------
  2477. NULL
  2478. (1 row)
  2479.  
  2480. -- from * to date
  2481. DROP FUNCTION IF EXISTS dateIn;
  2482. DROP FUNCTION
  2483. CREATE FUNCTION dateIn(date) RETURNS date
  2484. AS 'select $1;'
  2485. LANGUAGE SQL
  2486. IMMUTABLE
  2487. RETURNS NULL ON NULL INPUT;
  2488. CREATE FUNCTION
  2489. SELECT dateIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  2490. psql:implicitCasts.sql:646: ERROR: function datein(smallint) does not exist
  2491. LINE 1: SELECT dateIn(shortVal) FROM srcTestTable WHERE shortVal = 1...
  2492. ^
  2493. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2494. SELECT dateIn(intVal) FROM srcTestTable WHERE intVal = 1;
  2495. psql:implicitCasts.sql:647: ERROR: function datein(integer) does not exist
  2496. LINE 1: SELECT dateIn(intVal) FROM srcTestTable WHERE intVal = 1;
  2497. ^
  2498. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2499. SELECT dateIn(longVal) FROM srcTestTable WHERE longVal = 1;
  2500. psql:implicitCasts.sql:648: ERROR: function datein(bigint) does not exist
  2501. LINE 1: SELECT dateIn(longVal) FROM srcTestTable WHERE longVal = 1;
  2502. ^
  2503. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2504. SELECT dateIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  2505. psql:implicitCasts.sql:649: ERROR: function datein(double precision) does not exist
  2506. LINE 1: SELECT dateIn(doubleVal) FROM srcTestTable WHERE doubleVal <...
  2507. ^
  2508. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2509. SELECT dateIn(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  2510. psql:implicitCasts.sql:650: ERROR: function datein(real) does not exist
  2511. LINE 1: SELECT dateIn(floatVal) FROM srcTestTable WHERE floatVal< 1....
  2512. ^
  2513. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2514. SELECT dateIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  2515. psql:implicitCasts.sql:651: ERROR: function datein(numeric) does not exist
  2516. LINE 1: SELECT dateIn(decimal3_0Val) FROM srcTestTable WHERE decimal...
  2517. ^
  2518. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2519. SELECT dateIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  2520. psql:implicitCasts.sql:652: ERROR: function datein(numeric) does not exist
  2521. LINE 1: SELECT dateIn(decimal5_0Val) FROM srcTestTable WHERE decimal...
  2522. ^
  2523. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2524. SELECT dateIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  2525. psql:implicitCasts.sql:653: ERROR: function datein(numeric) does not exist
  2526. LINE 1: SELECT dateIn(decimal10_0Val) FROM srcTestTable WHERE decima...
  2527. ^
  2528. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2529. SELECT dateIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  2530. psql:implicitCasts.sql:654: ERROR: function datein(numeric) does not exist
  2531. LINE 1: SELECT dateIn(decimal10_2Val) FROM srcTestTable WHERE decima...
  2532. ^
  2533. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2534. SELECT dateIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  2535. psql:implicitCasts.sql:655: ERROR: function datein(numeric) does not exist
  2536. LINE 1: SELECT dateIn(decimal30_15Val) FROM srcTestTable WHERE decim...
  2537. ^
  2538. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2539. SELECT dateIn(decimal14_7In) FROM srcTestTable WHERE decimal30_15Val = 1;
  2540. psql:implicitCasts.sql:656: ERROR: column "decimal14_7in" does not exist
  2541. LINE 1: SELECT dateIn(decimal14_7In) FROM srcTestTable WHERE decimal...
  2542. ^
  2543. HINT: Perhaps you meant to reference the column "srctesttable.decimal14_7val".
  2544. SELECT dateIn(binaryVal) FROM srcTestTable LIMIT 1;
  2545. psql:implicitCasts.sql:657: ERROR: function datein(bytea) does not exist
  2546. LINE 1: SELECT dateIn(binaryVal) FROM srcTestTable LIMIT 1;
  2547. ^
  2548. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2549. SELECT dateIn(booleanVal) FROM srcTestTable LIMIT 1;
  2550. psql:implicitCasts.sql:658: ERROR: function datein(boolean) does not exist
  2551. LINE 1: SELECT dateIn(booleanVal) FROM srcTestTable LIMIT 1;
  2552. ^
  2553. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2554. SELECT dateIn(stringVal) FROM srcTestTable LIMIT 1;
  2555. psql:implicitCasts.sql:659: ERROR: function datein(text) does not exist
  2556. LINE 1: SELECT dateIn(stringVal) FROM srcTestTable LIMIT 1;
  2557. ^
  2558. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2559. SELECT dateIn(timestampVal) FROM srcTestTable LIMIT 1;
  2560. psql:implicitCasts.sql:660: ERROR: function datein(timestamp without time zone) does not exist
  2561. LINE 1: SELECT dateIn(timestampVal) FROM srcTestTable LIMIT 1;
  2562. ^
  2563. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2564. SELECT dateIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  2565. psql:implicitCasts.sql:661: ERROR: function datein(integer[]) does not exist
  2566. LINE 1: SELECT dateIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  2567. ^
  2568. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2569. SELECT dateIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2570. psql:implicitCasts.sql:662: ERROR: function datein(double precision[]) does not exist
  2571. LINE 1: SELECT dateIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2572. ^
  2573. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2574. SELECT dateIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  2575. psql:implicitCasts.sql:663: ERROR: function datein(structintdoublety) does not exist
  2576. LINE 1: SELECT dateIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  2577. ^
  2578. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2579. SELECT dateIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  2580. psql:implicitCasts.sql:664: ERROR: function datein(structstringintty) does not exist
  2581. LINE 1: SELECT dateIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  2582. ^
  2583. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2584. SELECT dateIn(null);
  2585. datein
  2586. --------
  2587. NULL
  2588. (1 row)
  2589.  
  2590. -- from * to timestamp
  2591. DROP FUNCTION IF EXISTS timestampIn;
  2592. DROP FUNCTION
  2593. CREATE FUNCTION timestampIn(timestamp) RETURNS timestamp
  2594. AS 'select $1;'
  2595. LANGUAGE SQL
  2596. IMMUTABLE
  2597. RETURNS NULL ON NULL INPUT;
  2598. CREATE FUNCTION
  2599. SELECT timestampIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  2600. psql:implicitCasts.sql:675: ERROR: function timestampin(smallint) does not exist
  2601. LINE 1: SELECT timestampIn(shortVal) FROM srcTestTable WHERE shortVa...
  2602. ^
  2603. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2604. SELECT timestampIn(intVal) FROM srcTestTable WHERE intVal = 1;
  2605. psql:implicitCasts.sql:676: ERROR: function timestampin(integer) does not exist
  2606. LINE 1: SELECT timestampIn(intVal) FROM srcTestTable WHERE intVal = ...
  2607. ^
  2608. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2609. SELECT timestampIn(longVal) FROM srcTestTable WHERE longVal = 1;
  2610. psql:implicitCasts.sql:677: ERROR: function timestampin(bigint) does not exist
  2611. LINE 1: SELECT timestampIn(longVal) FROM srcTestTable WHERE longVal ...
  2612. ^
  2613. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2614. SELECT timestampIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  2615. psql:implicitCasts.sql:678: ERROR: function timestampin(double precision) does not exist
  2616. LINE 1: SELECT timestampIn(doubleVal) FROM srcTestTable WHERE double...
  2617. ^
  2618. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2619. SELECT timestampIn(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  2620. psql:implicitCasts.sql:679: ERROR: function timestampin(real) does not exist
  2621. LINE 1: SELECT timestampIn(floatVal) FROM srcTestTable WHERE floatVa...
  2622. ^
  2623. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2624. SELECT timestampIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  2625. psql:implicitCasts.sql:680: ERROR: function timestampin(numeric) does not exist
  2626. LINE 1: SELECT timestampIn(decimal3_0Val) FROM srcTestTable WHERE de...
  2627. ^
  2628. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2629. SELECT timestampIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  2630. psql:implicitCasts.sql:681: ERROR: function timestampin(numeric) does not exist
  2631. LINE 1: SELECT timestampIn(decimal5_0Val) FROM srcTestTable WHERE de...
  2632. ^
  2633. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2634. SELECT timestampIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  2635. psql:implicitCasts.sql:682: ERROR: function timestampin(numeric) does not exist
  2636. LINE 1: SELECT timestampIn(decimal10_0Val) FROM srcTestTable WHERE d...
  2637. ^
  2638. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2639. SELECT timestampIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  2640. psql:implicitCasts.sql:683: ERROR: function timestampin(numeric) does not exist
  2641. LINE 1: SELECT timestampIn(decimal10_2Val) FROM srcTestTable WHERE d...
  2642. ^
  2643. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2644. SELECT timestampIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  2645. psql:implicitCasts.sql:684: ERROR: function timestampin(numeric) does not exist
  2646. LINE 1: SELECT timestampIn(decimal30_15Val) FROM srcTestTable WHERE ...
  2647. ^
  2648. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2649. SELECT timestampIn(decimal14_7In) FROM srcTestTable WHERE decimal30_15Val = 1;
  2650. psql:implicitCasts.sql:685: ERROR: column "decimal14_7in" does not exist
  2651. LINE 1: SELECT timestampIn(decimal14_7In) FROM srcTestTable WHERE de...
  2652. ^
  2653. HINT: Perhaps you meant to reference the column "srctesttable.decimal14_7val".
  2654. SELECT timestampIn(binaryVal) FROM srcTestTable LIMIT 1;
  2655. psql:implicitCasts.sql:686: ERROR: function timestampin(bytea) does not exist
  2656. LINE 1: SELECT timestampIn(binaryVal) FROM srcTestTable LIMIT 1;
  2657. ^
  2658. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2659. SELECT timestampIn(booleanVal) FROM srcTestTable LIMIT 1;
  2660. psql:implicitCasts.sql:687: ERROR: function timestampin(boolean) does not exist
  2661. LINE 1: SELECT timestampIn(booleanVal) FROM srcTestTable LIMIT 1;
  2662. ^
  2663. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2664. SELECT timestampIn(stringVal) FROM srcTestTable LIMIT 1;
  2665. psql:implicitCasts.sql:688: ERROR: function timestampin(text) does not exist
  2666. LINE 1: SELECT timestampIn(stringVal) FROM srcTestTable LIMIT 1;
  2667. ^
  2668. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2669. SELECT timestampIn(dateVal) FROM srcTestTable LIMIT 1;
  2670. timestampin
  2671. ---------------------
  2672. 1970-01-01 00:00:00
  2673. (1 row)
  2674.  
  2675. SELECT timestampIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  2676. psql:implicitCasts.sql:690: ERROR: function timestampin(integer[]) does not exist
  2677. LINE 1: SELECT timestampIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  2678. ^
  2679. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2680. SELECT timestampIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2681. psql:implicitCasts.sql:691: ERROR: function timestampin(double precision[]) does not exist
  2682. LINE 1: SELECT timestampIn(arrayDoubleVal) FROM srcTestTable LIMIT 1...
  2683. ^
  2684. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2685. SELECT timestampIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  2686. psql:implicitCasts.sql:692: ERROR: function timestampin(structintdoublety) does not exist
  2687. LINE 1: SELECT timestampIn(structIntDoubleVal) FROM srcTestTable LIM...
  2688. ^
  2689. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2690. SELECT timestampIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  2691. psql:implicitCasts.sql:693: ERROR: function timestampin(structstringintty) does not exist
  2692. LINE 1: SELECT timestampIn(structStringIntVal) FROM srcTestTable LIM...
  2693. ^
  2694. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2695. SELECT timestampIn(null);
  2696. timestampin
  2697. -------------
  2698. NULL
  2699. (1 row)
  2700.  
  2701. -- from * to int[]
  2702. DROP FUNCTION IF EXISTS arrayIntIn;
  2703. DROP FUNCTION
  2704. CREATE FUNCTION arrayIntIn(int[]) RETURNS int[]
  2705. AS 'select $1;'
  2706. LANGUAGE SQL
  2707. IMMUTABLE
  2708. RETURNS NULL ON NULL INPUT;
  2709. CREATE FUNCTION
  2710. SELECT arrayIntIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  2711. psql:implicitCasts.sql:704: ERROR: function arrayintin(smallint) does not exist
  2712. LINE 1: SELECT arrayIntIn(shortVal) FROM srcTestTable WHERE shortVal...
  2713. ^
  2714. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2715. SELECT arrayIntIn(intVal) FROM srcTestTable WHERE intVal = 1;
  2716. psql:implicitCasts.sql:705: ERROR: function arrayintin(integer) does not exist
  2717. LINE 1: SELECT arrayIntIn(intVal) FROM srcTestTable WHERE intVal = 1...
  2718. ^
  2719. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2720. SELECT arrayIntIn(longVal) FROM srcTestTable WHERE longVal = 1;
  2721. psql:implicitCasts.sql:706: ERROR: function arrayintin(bigint) does not exist
  2722. LINE 1: SELECT arrayIntIn(longVal) FROM srcTestTable WHERE longVal =...
  2723. ^
  2724. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2725. SELECT arrayIntIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  2726. psql:implicitCasts.sql:707: ERROR: function arrayintin(double precision) does not exist
  2727. LINE 1: SELECT arrayIntIn(doubleVal) FROM srcTestTable WHERE doubleV...
  2728. ^
  2729. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2730. SELECT arrayIntIn(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  2731. psql:implicitCasts.sql:708: ERROR: function arrayintin(real) does not exist
  2732. LINE 1: SELECT arrayIntIn(floatVal) FROM srcTestTable WHERE floatVal...
  2733. ^
  2734. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2735. SELECT arrayIntIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  2736. psql:implicitCasts.sql:709: ERROR: function arrayintin(numeric) does not exist
  2737. LINE 1: SELECT arrayIntIn(decimal3_0Val) FROM srcTestTable WHERE dec...
  2738. ^
  2739. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2740. SELECT arrayIntIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  2741. psql:implicitCasts.sql:710: ERROR: function arrayintin(numeric) does not exist
  2742. LINE 1: SELECT arrayIntIn(decimal5_0Val) FROM srcTestTable WHERE dec...
  2743. ^
  2744. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2745. SELECT arrayIntIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  2746. psql:implicitCasts.sql:711: ERROR: function arrayintin(numeric) does not exist
  2747. LINE 1: SELECT arrayIntIn(decimal10_0Val) FROM srcTestTable WHERE de...
  2748. ^
  2749. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2750. SELECT arrayIntIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  2751. psql:implicitCasts.sql:712: ERROR: function arrayintin(numeric) does not exist
  2752. LINE 1: SELECT arrayIntIn(decimal10_2Val) FROM srcTestTable WHERE de...
  2753. ^
  2754. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2755. SELECT arrayIntIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  2756. psql:implicitCasts.sql:713: ERROR: function arrayintin(numeric) does not exist
  2757. LINE 1: SELECT arrayIntIn(decimal30_15Val) FROM srcTestTable WHERE d...
  2758. ^
  2759. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2760. SELECT arrayIntIn(decimal14_7In) FROM srcTestTable WHERE decimal30_15Val = 1;
  2761. psql:implicitCasts.sql:714: ERROR: column "decimal14_7in" does not exist
  2762. LINE 1: SELECT arrayIntIn(decimal14_7In) FROM srcTestTable WHERE dec...
  2763. ^
  2764. HINT: Perhaps you meant to reference the column "srctesttable.decimal14_7val".
  2765. SELECT arrayIntIn(binaryVal) FROM srcTestTable LIMIT 1;
  2766. psql:implicitCasts.sql:715: ERROR: function arrayintin(bytea) does not exist
  2767. LINE 1: SELECT arrayIntIn(binaryVal) FROM srcTestTable LIMIT 1;
  2768. ^
  2769. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2770. SELECT arrayIntIn(booleanVal) FROM srcTestTable LIMIT 1;
  2771. psql:implicitCasts.sql:716: ERROR: function arrayintin(boolean) does not exist
  2772. LINE 1: SELECT arrayIntIn(booleanVal) FROM srcTestTable LIMIT 1;
  2773. ^
  2774. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2775. SELECT arrayIntIn(stringVal) FROM srcTestTable LIMIT 1;
  2776. psql:implicitCasts.sql:717: ERROR: function arrayintin(text) does not exist
  2777. LINE 1: SELECT arrayIntIn(stringVal) FROM srcTestTable LIMIT 1;
  2778. ^
  2779. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2780. SELECT arrayIntIn(dateVal) FROM srcTestTable LIMIT 1;
  2781. psql:implicitCasts.sql:718: ERROR: function arrayintin(date) does not exist
  2782. LINE 1: SELECT arrayIntIn(dateVal) FROM srcTestTable LIMIT 1;
  2783. ^
  2784. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2785. SELECT arrayIntIn(timestampVal) FROM srcTestTable LIMIT 1;
  2786. psql:implicitCasts.sql:719: ERROR: function arrayintin(timestamp without time zone) does not exist
  2787. LINE 1: SELECT arrayIntIn(timestampVal) FROM srcTestTable LIMIT 1;
  2788. ^
  2789. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2790. SELECT arrayIntIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2791. psql:implicitCasts.sql:720: ERROR: function arrayintin(double precision[]) does not exist
  2792. LINE 1: SELECT arrayIntIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  2793. ^
  2794. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2795. SELECT arrayIntIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  2796. psql:implicitCasts.sql:721: ERROR: function arrayintin(structintdoublety) does not exist
  2797. LINE 1: SELECT arrayIntIn(structIntDoubleVal) FROM srcTestTable LIMI...
  2798. ^
  2799. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2800. SELECT arrayIntIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  2801. psql:implicitCasts.sql:722: ERROR: function arrayintin(structstringintty) does not exist
  2802. LINE 1: SELECT arrayIntIn(structStringIntVal) FROM srcTestTable LIMI...
  2803. ^
  2804. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2805. SELECT arrayIntIn(null);
  2806. arrayintin
  2807. ------------
  2808. NULL
  2809. (1 row)
  2810.  
  2811. -- from * to float8[]
  2812. DROP FUNCTION IF EXISTS arrayDoubleIn;
  2813. DROP FUNCTION
  2814. CREATE FUNCTION arrayDoubleIn(float8[]) RETURNS float8[]
  2815. AS 'select $1;'
  2816. LANGUAGE SQL
  2817. IMMUTABLE
  2818. RETURNS NULL ON NULL INPUT;
  2819. CREATE FUNCTION
  2820. SELECT arrayDoubleIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  2821. psql:implicitCasts.sql:733: ERROR: function arraydoublein(smallint) does not exist
  2822. LINE 1: SELECT arrayDoubleIn(shortVal) FROM srcTestTable WHERE short...
  2823. ^
  2824. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2825. SELECT arrayDoubleIn(intVal) FROM srcTestTable WHERE intVal = 1;
  2826. psql:implicitCasts.sql:734: ERROR: function arraydoublein(integer) does not exist
  2827. LINE 1: SELECT arrayDoubleIn(intVal) FROM srcTestTable WHERE intVal ...
  2828. ^
  2829. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2830. SELECT arrayDoubleIn(longVal) FROM srcTestTable WHERE longVal = 1;
  2831. psql:implicitCasts.sql:735: ERROR: function arraydoublein(bigint) does not exist
  2832. LINE 1: SELECT arrayDoubleIn(longVal) FROM srcTestTable WHERE longVa...
  2833. ^
  2834. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2835. SELECT arrayDoubleIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  2836. psql:implicitCasts.sql:736: ERROR: function arraydoublein(double precision) does not exist
  2837. LINE 1: SELECT arrayDoubleIn(doubleVal) FROM srcTestTable WHERE doub...
  2838. ^
  2839. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2840. SELECT arrayDoubleIn(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  2841. psql:implicitCasts.sql:737: ERROR: function arraydoublein(real) does not exist
  2842. LINE 1: SELECT arrayDoubleIn(floatVal) FROM srcTestTable WHERE float...
  2843. ^
  2844. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2845. SELECT arrayDoubleIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  2846. psql:implicitCasts.sql:738: ERROR: function arraydoublein(numeric) does not exist
  2847. LINE 1: SELECT arrayDoubleIn(decimal3_0Val) FROM srcTestTable WHERE ...
  2848. ^
  2849. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2850. SELECT arrayDoubleIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  2851. psql:implicitCasts.sql:739: ERROR: function arraydoublein(numeric) does not exist
  2852. LINE 1: SELECT arrayDoubleIn(decimal5_0Val) FROM srcTestTable WHERE ...
  2853. ^
  2854. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2855. SELECT arrayDoubleIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  2856. psql:implicitCasts.sql:740: ERROR: function arraydoublein(numeric) does not exist
  2857. LINE 1: SELECT arrayDoubleIn(decimal10_0Val) FROM srcTestTable WHERE...
  2858. ^
  2859. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2860. SELECT arrayDoubleIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  2861. psql:implicitCasts.sql:741: ERROR: function arraydoublein(numeric) does not exist
  2862. LINE 1: SELECT arrayDoubleIn(decimal10_2Val) FROM srcTestTable WHERE...
  2863. ^
  2864. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2865. SELECT arrayDoubleIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  2866. psql:implicitCasts.sql:742: ERROR: function arraydoublein(numeric) does not exist
  2867. LINE 1: SELECT arrayDoubleIn(decimal30_15Val) FROM srcTestTable WHER...
  2868. ^
  2869. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2870. SELECT arrayDoubleIn(decimal14_7In) FROM srcTestTable WHERE decimal30_15Val = 1;
  2871. psql:implicitCasts.sql:743: ERROR: column "decimal14_7in" does not exist
  2872. LINE 1: SELECT arrayDoubleIn(decimal14_7In) FROM srcTestTable WHERE ...
  2873. ^
  2874. HINT: Perhaps you meant to reference the column "srctesttable.decimal14_7val".
  2875. SELECT arrayDoubleIn(binaryVal) FROM srcTestTable LIMIT 1;
  2876. psql:implicitCasts.sql:744: ERROR: function arraydoublein(bytea) does not exist
  2877. LINE 1: SELECT arrayDoubleIn(binaryVal) FROM srcTestTable LIMIT 1;
  2878. ^
  2879. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2880. SELECT arrayDoubleIn(booleanVal) FROM srcTestTable LIMIT 1;
  2881. psql:implicitCasts.sql:745: ERROR: function arraydoublein(boolean) does not exist
  2882. LINE 1: SELECT arrayDoubleIn(booleanVal) FROM srcTestTable LIMIT 1;
  2883. ^
  2884. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2885. SELECT arrayDoubleIn(stringVal) FROM srcTestTable LIMIT 1;
  2886. psql:implicitCasts.sql:746: ERROR: function arraydoublein(text) does not exist
  2887. LINE 1: SELECT arrayDoubleIn(stringVal) FROM srcTestTable LIMIT 1;
  2888. ^
  2889. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2890. SELECT arrayDoubleIn(dateVal) FROM srcTestTable LIMIT 1;
  2891. psql:implicitCasts.sql:747: ERROR: function arraydoublein(date) does not exist
  2892. LINE 1: SELECT arrayDoubleIn(dateVal) FROM srcTestTable LIMIT 1;
  2893. ^
  2894. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2895. SELECT arrayDoubleIn(timestampVal) FROM srcTestTable LIMIT 1;
  2896. psql:implicitCasts.sql:748: ERROR: function arraydoublein(timestamp without time zone) does not exist
  2897. LINE 1: SELECT arrayDoubleIn(timestampVal) FROM srcTestTable LIMIT 1...
  2898. ^
  2899. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2900. SELECT arrayDoubleIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  2901. arraydoublein
  2902. ---------------
  2903. {1,2,3}
  2904. (1 row)
  2905.  
  2906. SELECT arrayDoubleIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  2907. psql:implicitCasts.sql:750: ERROR: function arraydoublein(structintdoublety) does not exist
  2908. LINE 1: SELECT arrayDoubleIn(structIntDoubleVal) FROM srcTestTable L...
  2909. ^
  2910. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2911. SELECT arrayDoubleIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  2912. psql:implicitCasts.sql:751: ERROR: function arraydoublein(structstringintty) does not exist
  2913. LINE 1: SELECT arrayDoubleIn(structStringIntVal) FROM srcTestTable L...
  2914. ^
  2915. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2916. SELECT arrayDoubleIn(null);
  2917. arraydoublein
  2918. ---------------
  2919. NULL
  2920. (1 row)
  2921.  
  2922. -- from * to structIntDoubleTy
  2923. DROP FUNCTION IF EXISTS structIntDoubleIn;
  2924. DROP FUNCTION
  2925. CREATE FUNCTION structIntDoubleIn(structIntDoubleTy) RETURNS structIntDoubleTy
  2926. AS 'select $1;'
  2927. LANGUAGE SQL
  2928. IMMUTABLE
  2929. RETURNS NULL ON NULL INPUT;
  2930. CREATE FUNCTION
  2931. SELECT structIntDoubleIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  2932. psql:implicitCasts.sql:762: ERROR: function structintdoublein(smallint) does not exist
  2933. LINE 1: SELECT structIntDoubleIn(shortVal) FROM srcTestTable WHERE s...
  2934. ^
  2935. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2936. SELECT structIntDoubleIn(intVal) FROM srcTestTable WHERE intVal = 1;
  2937. psql:implicitCasts.sql:763: ERROR: function structintdoublein(integer) does not exist
  2938. LINE 1: SELECT structIntDoubleIn(intVal) FROM srcTestTable WHERE int...
  2939. ^
  2940. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2941. SELECT structIntDoubleIn(longVal) FROM srcTestTable WHERE longVal = 1;
  2942. psql:implicitCasts.sql:764: ERROR: function structintdoublein(bigint) does not exist
  2943. LINE 1: SELECT structIntDoubleIn(longVal) FROM srcTestTable WHERE lo...
  2944. ^
  2945. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2946. SELECT structIntDoubleIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  2947. psql:implicitCasts.sql:765: ERROR: function structintdoublein(double precision) does not exist
  2948. LINE 1: SELECT structIntDoubleIn(doubleVal) FROM srcTestTable WHERE ...
  2949. ^
  2950. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2951. SELECT structIntDoubleIn(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  2952. psql:implicitCasts.sql:766: ERROR: function structintdoublein(real) does not exist
  2953. LINE 1: SELECT structIntDoubleIn(floatVal) FROM srcTestTable WHERE f...
  2954. ^
  2955. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2956. SELECT structIntDoubleIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  2957. psql:implicitCasts.sql:767: ERROR: function structintdoublein(numeric) does not exist
  2958. LINE 1: SELECT structIntDoubleIn(decimal3_0Val) FROM srcTestTable WH...
  2959. ^
  2960. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2961. SELECT structIntDoubleIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  2962. psql:implicitCasts.sql:768: ERROR: function structintdoublein(numeric) does not exist
  2963. LINE 1: SELECT structIntDoubleIn(decimal5_0Val) FROM srcTestTable WH...
  2964. ^
  2965. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2966. SELECT structIntDoubleIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  2967. psql:implicitCasts.sql:769: ERROR: function structintdoublein(numeric) does not exist
  2968. LINE 1: SELECT structIntDoubleIn(decimal10_0Val) FROM srcTestTable W...
  2969. ^
  2970. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2971. SELECT structIntDoubleIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  2972. psql:implicitCasts.sql:770: ERROR: function structintdoublein(numeric) does not exist
  2973. LINE 1: SELECT structIntDoubleIn(decimal10_2Val) FROM srcTestTable W...
  2974. ^
  2975. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2976. SELECT structIntDoubleIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  2977. psql:implicitCasts.sql:771: ERROR: function structintdoublein(numeric) does not exist
  2978. LINE 1: SELECT structIntDoubleIn(decimal30_15Val) FROM srcTestTable ...
  2979. ^
  2980. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2981. SELECT structIntDoubleIn(decimal14_7In) FROM srcTestTable WHERE decimal30_15Val = 1;
  2982. psql:implicitCasts.sql:772: ERROR: column "decimal14_7in" does not exist
  2983. LINE 1: SELECT structIntDoubleIn(decimal14_7In) FROM srcTestTable WH...
  2984. ^
  2985. HINT: Perhaps you meant to reference the column "srctesttable.decimal14_7val".
  2986. SELECT structIntDoubleIn(binaryVal) FROM srcTestTable LIMIT 1;
  2987. psql:implicitCasts.sql:773: ERROR: function structintdoublein(bytea) does not exist
  2988. LINE 1: SELECT structIntDoubleIn(binaryVal) FROM srcTestTable LIMIT ...
  2989. ^
  2990. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2991. SELECT structIntDoubleIn(booleanVal) FROM srcTestTable LIMIT 1;
  2992. psql:implicitCasts.sql:774: ERROR: function structintdoublein(boolean) does not exist
  2993. LINE 1: SELECT structIntDoubleIn(booleanVal) FROM srcTestTable LIMIT...
  2994. ^
  2995. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  2996. SELECT structIntDoubleIn(stringVal) FROM srcTestTable LIMIT 1;
  2997. psql:implicitCasts.sql:775: ERROR: function structintdoublein(text) does not exist
  2998. LINE 1: SELECT structIntDoubleIn(stringVal) FROM srcTestTable LIMIT ...
  2999. ^
  3000. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3001. SELECT structIntDoubleIn(dateVal) FROM srcTestTable LIMIT 1;
  3002. psql:implicitCasts.sql:776: ERROR: function structintdoublein(date) does not exist
  3003. LINE 1: SELECT structIntDoubleIn(dateVal) FROM srcTestTable LIMIT 1;
  3004. ^
  3005. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3006. SELECT structIntDoubleIn(timestampVal) FROM srcTestTable LIMIT 1;
  3007. psql:implicitCasts.sql:777: ERROR: function structintdoublein(timestamp without time zone) does not exist
  3008. LINE 1: SELECT structIntDoubleIn(timestampVal) FROM srcTestTable LIM...
  3009. ^
  3010. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3011. SELECT structIntDoubleIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  3012. psql:implicitCasts.sql:778: ERROR: function structintdoublein(integer[]) does not exist
  3013. LINE 1: SELECT structIntDoubleIn(arrayIntVal) FROM srcTestTable LIMI...
  3014. ^
  3015. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3016. SELECT structIntDoubleIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  3017. psql:implicitCasts.sql:779: ERROR: function structintdoublein(double precision[]) does not exist
  3018. LINE 1: SELECT structIntDoubleIn(arrayDoubleVal) FROM srcTestTable L...
  3019. ^
  3020. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3021. SELECT structIntDoubleIn(structStringIntVal) FROM srcTestTable LIMIT 1;
  3022. psql:implicitCasts.sql:780: ERROR: function structintdoublein(structstringintty) does not exist
  3023. LINE 1: SELECT structIntDoubleIn(structStringIntVal) FROM srcTestTab...
  3024. ^
  3025. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3026. SELECT structIntDoubleIn(null);
  3027. structintdoublein
  3028. -------------------
  3029. NULL
  3030. (1 row)
  3031.  
  3032. -- from * to structStringIntTy
  3033. DROP FUNCTION IF EXISTS structStringIntIn;
  3034. DROP FUNCTION
  3035. CREATE FUNCTION structStringIntIn(structStringIntTy) RETURNS structStringIntTy
  3036. AS 'select $1;'
  3037. LANGUAGE SQL
  3038. IMMUTABLE
  3039. RETURNS NULL ON NULL INPUT;
  3040. CREATE FUNCTION
  3041. SELECT structStringIntIn(shortVal) FROM srcTestTable WHERE shortVal = 1;
  3042. psql:implicitCasts.sql:791: ERROR: function structstringintin(smallint) does not exist
  3043. LINE 1: SELECT structStringIntIn(shortVal) FROM srcTestTable WHERE s...
  3044. ^
  3045. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3046. SELECT structStringIntIn(intVal) FROM srcTestTable WHERE intVal = 1;
  3047. psql:implicitCasts.sql:792: ERROR: function structstringintin(integer) does not exist
  3048. LINE 1: SELECT structStringIntIn(intVal) FROM srcTestTable WHERE int...
  3049. ^
  3050. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3051. SELECT structStringIntIn(longVal) FROM srcTestTable WHERE longVal = 1;
  3052. psql:implicitCasts.sql:793: ERROR: function structstringintin(bigint) does not exist
  3053. LINE 1: SELECT structStringIntIn(longVal) FROM srcTestTable WHERE lo...
  3054. ^
  3055. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3056. SELECT structStringIntIn(doubleVal) FROM srcTestTable WHERE doubleVal < 1.1;
  3057. psql:implicitCasts.sql:794: ERROR: function structstringintin(double precision) does not exist
  3058. LINE 1: SELECT structStringIntIn(doubleVal) FROM srcTestTable WHERE ...
  3059. ^
  3060. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3061. SELECT structStringIntIn(floatVal) FROM srcTestTable WHERE floatVal< 1.1;
  3062. psql:implicitCasts.sql:795: ERROR: function structstringintin(real) does not exist
  3063. LINE 1: SELECT structStringIntIn(floatVal) FROM srcTestTable WHERE f...
  3064. ^
  3065. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3066. SELECT structStringIntIn(decimal3_0Val) FROM srcTestTable WHERE decimal3_0Val = 1;
  3067. psql:implicitCasts.sql:796: ERROR: function structstringintin(numeric) does not exist
  3068. LINE 1: SELECT structStringIntIn(decimal3_0Val) FROM srcTestTable WH...
  3069. ^
  3070. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3071. SELECT structStringIntIn(decimal5_0Val) FROM srcTestTable WHERE decimal5_0Val = 1;
  3072. psql:implicitCasts.sql:797: ERROR: function structstringintin(numeric) does not exist
  3073. LINE 1: SELECT structStringIntIn(decimal5_0Val) FROM srcTestTable WH...
  3074. ^
  3075. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3076. SELECT structStringIntIn(decimal10_0Val) FROM srcTestTable WHERE decimal10_0Val = 1;
  3077. psql:implicitCasts.sql:798: ERROR: function structstringintin(numeric) does not exist
  3078. LINE 1: SELECT structStringIntIn(decimal10_0Val) FROM srcTestTable W...
  3079. ^
  3080. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3081. SELECT structStringIntIn(decimal10_2Val) FROM srcTestTable WHERE decimal10_2Val = 1;
  3082. psql:implicitCasts.sql:799: ERROR: function structstringintin(numeric) does not exist
  3083. LINE 1: SELECT structStringIntIn(decimal10_2Val) FROM srcTestTable W...
  3084. ^
  3085. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3086. SELECT structStringIntIn(decimal30_15Val) FROM srcTestTable WHERE decimal30_15Val = 1;
  3087. psql:implicitCasts.sql:800: ERROR: function structstringintin(numeric) does not exist
  3088. LINE 1: SELECT structStringIntIn(decimal30_15Val) FROM srcTestTable ...
  3089. ^
  3090. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3091. SELECT structStringIntIn(decimal14_7In) FROM srcTestTable WHERE decimal30_15Val = 1;
  3092. psql:implicitCasts.sql:801: ERROR: column "decimal14_7in" does not exist
  3093. LINE 1: SELECT structStringIntIn(decimal14_7In) FROM srcTestTable WH...
  3094. ^
  3095. HINT: Perhaps you meant to reference the column "srctesttable.decimal14_7val".
  3096. SELECT structStringIntIn(binaryVal) FROM srcTestTable LIMIT 1;
  3097. psql:implicitCasts.sql:802: ERROR: function structstringintin(bytea) does not exist
  3098. LINE 1: SELECT structStringIntIn(binaryVal) FROM srcTestTable LIMIT ...
  3099. ^
  3100. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3101. SELECT structStringIntIn(booleanVal) FROM srcTestTable LIMIT 1;
  3102. psql:implicitCasts.sql:803: ERROR: function structstringintin(boolean) does not exist
  3103. LINE 1: SELECT structStringIntIn(booleanVal) FROM srcTestTable LIMIT...
  3104. ^
  3105. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3106. SELECT structStringIntIn(stringVal) FROM srcTestTable LIMIT 1;
  3107. psql:implicitCasts.sql:804: ERROR: function structstringintin(text) does not exist
  3108. LINE 1: SELECT structStringIntIn(stringVal) FROM srcTestTable LIMIT ...
  3109. ^
  3110. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3111. SELECT structStringIntIn(dateVal) FROM srcTestTable LIMIT 1;
  3112. psql:implicitCasts.sql:805: ERROR: function structstringintin(date) does not exist
  3113. LINE 1: SELECT structStringIntIn(dateVal) FROM srcTestTable LIMIT 1;
  3114. ^
  3115. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3116. SELECT structStringIntIn(timestampVal) FROM srcTestTable LIMIT 1;
  3117. psql:implicitCasts.sql:806: ERROR: function structstringintin(timestamp without time zone) does not exist
  3118. LINE 1: SELECT structStringIntIn(timestampVal) FROM srcTestTable LIM...
  3119. ^
  3120. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3121. SELECT structStringIntIn(arrayIntVal) FROM srcTestTable LIMIT 1;
  3122. psql:implicitCasts.sql:807: ERROR: function structstringintin(integer[]) does not exist
  3123. LINE 1: SELECT structStringIntIn(arrayIntVal) FROM srcTestTable LIMI...
  3124. ^
  3125. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3126. SELECT structStringIntIn(arrayDoubleVal) FROM srcTestTable LIMIT 1;
  3127. psql:implicitCasts.sql:808: ERROR: function structstringintin(double precision[]) does not exist
  3128. LINE 1: SELECT structStringIntIn(arrayDoubleVal) FROM srcTestTable L...
  3129. ^
  3130. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3131. SELECT structStringIntIn(structIntDoubleVal) FROM srcTestTable LIMIT 1;
  3132. psql:implicitCasts.sql:809: ERROR: function structstringintin(structintdoublety) does not exist
  3133. LINE 1: SELECT structStringIntIn(structIntDoubleVal) FROM srcTestTab...
  3134. ^
  3135. HINT: No function matches the given name and argument types. You might need to add explicit type casts.
  3136. SELECT structStringIntIn(null);
  3137. structstringintin
  3138. -------------------
  3139. NULL
  3140. (1 row)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement