toni t. wrote in post #1102290:
> Robby Russell wrote in post #72333:
>
>>
>> SELECT setval('entities_id_seq', (SELECT MAX(id) FROM entities)+1);
>>
>> reload your app...and see if its still happening.
>>
>> Good luck!
>>
>> -Robby
>
> I don't code with Ruby but i registered only to say THANK YOU Robby you
> saved my day.
Hi,
I am writing below statement in pqsl file in function
endpoint_to_dyninfo_func()
SELECT setval('endpoints_dyninfo_id_seq', (SELECT MAX(id) FROM
endpoints_dyninfo));
But i am gettign error if i am compiling using user msw as,
psql -Umsw < all_trigger_func.pgsql
ERROR: syntax error at or near "endpoints_dyninfo_id_seq"
LINE 22: SELECT setval('endpoints_dyninfo_id_seq', (SELECT MAX(...
^
ERROR: function endpoint_to_dyninfo_func() does not exist
Same statement i can use using below steps.
1> Ratnesh-alt:/databases/databases/pg_log # psql -Umsw
2>
msw=# SELECT setval('endpoints_dyninfo_id_seq', (SELECT MAX(id) FROM
endpoints_dyninfo));
setval
--------
1326
(1 row)
Please help asap.
Thanks,
Ratnesh
--
Posted via http://www.ruby-forum.com/.
--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a77f5bbcf2fde94dff07dce51ef01b56%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment