That statement you pasted defines it, it's stored as a function in
postgres. See https://www.postgresql.org/docs/9.5/static/xfunc-sql.html
for docs on how this works in postgres.
John Pearson <mailto:[email protected]>
July 10, 2017 at 2:36 PMvia Postbox
<https://www.postbox-inc.com/?utm_source=email&utm_medium=sumlink&utm_campaign=reach>
My question, if this is my migration:
*migration.rb*
def change
connection.execute <<-SQL
CREATE OR REPLACE FUNCTION john_uuid_generator() RETURNS uuid
AS $$ SELECT * FROM #{uuid_function} $$
LANGUAGE SQL VOLATILE;
SQL
end
Where do I define john_uuid_generator()?
Thanks!
--
You received this message because you are subscribed to the Google
Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/CAKNtY_x1qm_VXqcUdMXQ8pytHQF2tFuLAmgnv%2Bvf-8uZGXBMqw%40mail.gmail.com
<https://groups.google.com/d/msgid/rubyonrails-talk/CAKNtY_x1qm_VXqcUdMXQ8pytHQF2tFuLAmgnv%2Bvf-8uZGXBMqw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Matt
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/5963FD32.8070208%40gmail.com.
For more options, visit https://groups.google.com/d/optout.