Start and end processing

Most SQL statements cause the database server to execute the function that you register for am_open. To fulfill the am_open tasks, the function can open a connection, store file-handles or smart-large-object handles, allocate user memory, and set the number of entries that am_getnext returns.

At the end of processing, the database server calls the function that you register for am_close. This close of access-method processing reverses the actions of the am_open purpose function. It deallocates memory and writes smart-large-object data to disk.