@@ 2415-2443 (lines=29) @@ | ||
2412 | $first = false; |
|
2413 | } |
|
2414 | ||
2415 | switch ($type[$i]) { |
|
2416 | // Have to account for weird placing of length for with/without |
|
2417 | // time zone types |
|
2418 | case 'timestamp with time zone': |
|
2419 | case 'timestamp without time zone': |
|
2420 | $qual = substr($type[$i], 9); |
|
2421 | $sql .= "\"{$field[$i]}\" timestamp"; |
|
2422 | if ($length[$i] != '') { |
|
2423 | $sql .= "({$length[$i]})"; |
|
2424 | } |
|
2425 | ||
2426 | $sql .= $qual; |
|
2427 | break; |
|
2428 | case 'time with time zone': |
|
2429 | case 'time without time zone': |
|
2430 | $qual = substr($type[$i], 4); |
|
2431 | $sql .= "\"{$field[$i]}\" time"; |
|
2432 | if ($length[$i] != '') { |
|
2433 | $sql .= "({$length[$i]})"; |
|
2434 | } |
|
2435 | ||
2436 | $sql .= $qual; |
|
2437 | break; |
|
2438 | default: |
|
2439 | $sql .= "\"{$field[$i]}\" {$type[$i]}"; |
|
2440 | if ($length[$i] != '') { |
|
2441 | $sql .= "({$length[$i]})"; |
|
2442 | } |
|
2443 | } |
|
2444 | // Add array qualifier if necessary |
|
2445 | if ($array[$i] == '[]') { |
|
2446 | $sql .= '[]'; |
|
@@ 5884-5912 (lines=29) @@ | ||
5881 | $first = false; |
|
5882 | } |
|
5883 | ||
5884 | switch ($type[$i]) { |
|
5885 | // Have to account for weird placing of length for with/without |
|
5886 | // time zone types |
|
5887 | case 'timestamp with time zone': |
|
5888 | case 'timestamp without time zone': |
|
5889 | $qual = substr($type[$i], 9); |
|
5890 | $sql .= "\"{$field[$i]}\" timestamp"; |
|
5891 | if ($length[$i] != '') { |
|
5892 | $sql .= "({$length[$i]})"; |
|
5893 | } |
|
5894 | ||
5895 | $sql .= $qual; |
|
5896 | break; |
|
5897 | case 'time with time zone': |
|
5898 | case 'time without time zone': |
|
5899 | $qual = substr($type[$i], 4); |
|
5900 | $sql .= "\"{$field[$i]}\" time"; |
|
5901 | if ($length[$i] != '') { |
|
5902 | $sql .= "({$length[$i]})"; |
|
5903 | } |
|
5904 | ||
5905 | $sql .= $qual; |
|
5906 | break; |
|
5907 | default: |
|
5908 | $sql .= "\"{$field[$i]}\" {$type[$i]}"; |
|
5909 | if ($length[$i] != '') { |
|
5910 | $sql .= "({$length[$i]})"; |
|
5911 | } |
|
5912 | } |
|
5913 | // Add array qualifier if necessary |
|
5914 | if ($array[$i] == '[]') { |
|
5915 | $sql .= '[]'; |