OTL 4.0, Examples for PostgreSQL / ODBC

The examples below work with PostgreSQL via ODBC. In general, all of these examples should work with the latest version of PostgreSQL, when ODBC  is enabled in OTL by setting #define OTL_ODBC, or #define OTL_ODBC_POSTGRESQL. For more examples, see the Generic ODBC examples.
  1. Example 140 (Simple Insert/Select/Update)
  2. Example 141 ("Incompatible datatypes in stream operation" exception)
  3. Example 142 (otl_datetime container and DATE/TIME/TIMESTAMP  table columns)
  4. Example 143 (otl_long_string container and a TEXT column)
  5. Example 144 (std::string and STL-compliant stream iterators)
  6. Example 145 (otl_stream::describe_select() with a simple Select)
  7. Example 146 (otl_stream and NULLs)
  8. Example 214 (OTL_ADD_NULL_TERMINATOR_STRING_SIZE, PostgreSQL)
  9. Example 342 (otl_stream_read_iterator, "get by name" functions, PostgreSQL)
  10. Example 345 (Insert/Update/Select with TEXT in stream mode and otl_stream_read_iterator)
  11. Example 346 (Insert/Update/Select with BYTEA in stream mode and otl_stream_read_iterator)
  12. Example 347 (Strict numeric type checking on SELECTs)
  13. Example 348  (Simple Unicode Insert/Select and VARCHAR strings)
  14. Example 349 (Simple Unicode Insert/Select with TEXT)
  15. Example 350 (Simple Insert/Select/Update with a BOOL column)
  16. Example 361 (Unicode VARCHAR Insert/Select and #define OTL_UNICODE_CHAR_TYPE)
  17. Example 362 (Unicode VARCHAR Insert/Select and #define OTL_UNICODE_STRING_TYPE)
  18. Example 369 (Unicode TEXT Insert/Select and #define OTL_UNICODE_STRING_TYPE)
  19. Example 376 (Simple Insert/Select, otl_connect::operator<<, <<=, >>)
  20. Example 383 (Insert/Update/Select, PostgreSQL TEXT in stream mode, and std:strings)
  21. Example 393 (Insert/Update/Select with PostgreSQL TEXT  in stream mode, without otl_lob_stream::set_len())
  22. Example 454 (Simple Insert/Select with BYTEA datatype)
  23. Example 465 (Simple Insert/Select with BYTEA datatype and otl_stream_read_iterator)
  24. Example 675 (Simple Insert/Select/Update #define OTL_ODBC_MULTI_MODE)
  25. Example 676 (otl_datetime container and a TIMESTAMP  WITH TIMEZONE table column)
  26. Example 686 (otl_datetime container and a TIMESTAMP  WITH TIMEZONE table column under #define OTL_UNICODE)
  27. Example 706 (XML as varchar_long/otl_long_string on SELECT, and varchar_long/otl_long_string on INSERT)
  28. Example 707 (XML as varchar_long/std::string  on SELECT and varchar_long/std::string on INSERT)
  29. Example 708 (XML as varchar_long/otl_long_unicode_string on SELECT, and varchar_unicode_long/otl_long_string on INSERT)
  30. Example 709 (XML as varchar_long/wstring  on SELECT and varchar_long/wstring on INSERT)
  31. Example 716 (END-OF_ROW check)
  32. Example 745 (UTF-8 client encoding: Insert/Select)
  33. Example 758 (otl_read_from_stream() / otl_write_to_stream() and STL containers)
  34. Example 762 (JSON as varchar_long/std::string  on SELECT and varchar_long/std::string on INSERT)
  35. Example 767 (otl_connect_pool)
  36. Example 768 (PostgreSQL 9.5 UPSERT,  otl_read_row() and otl_write_row())

Prev NextContentsGo Home

Copyright © 1996-2024, Sergei Kuchin, email: skuchin@gmail.com, skuchin@gmail.com .

Permission to use, copy, modify and redistribute this document for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.