I am in the process of evaluating Cloud Spanner to determine if its the proper fit. We currently are running a PostgreSQL database and am planning to build in some functions and triggers so we can centralize some of the queries and have them as standards.
When looking into Spanner, I do not see any means of creating stored procs, functions or triggers. Seems like these options may not be available, so I am trying to figure out how to do this in the cloud? Do I use Could Functions or something?
Hopefully what I am trying to say makes sense and thank you in advance for any help.
Thank you.
As you mentioned in the public documentation the functionality should be created in the application logic [1]:
serial
data types as sequence generatorsI found this Stackoverflow article that suggested using App engine for small scripts and Dataflow for large jobs [2].
As for the triggers I believe you can use Cloud Functions as mentioned in the documentation [3].
Hopefully this answered your questions.
[1]https://cloud.google.com/spanner/docs/migrating-postgres-spanner#other-database-objects [2]https://stackoverflow.com/questions/42278193/does-google-cloud-spanner-support-stored-procedures
[3]https://cloud.google.com/spanner/docs/use-cloud-functions