Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

Convert function Postgresql to Sqlite

0

43 views

Hi I have a problem between a database in PostgreSQL and SQLite. I need to work (single user) I had to create the database in SQLite, and luckily I managed to recreate the entire structure of the original DB into Postgresql.

But now I have a problem. At some point in the Postgresql DB queries within the function with. Is there a way to do the same thing in Sqlite? Or how can I get the same result in Sqlite? What should I do?

Hello and Thank you Luca

asked May 7, 2011 12:23 pm CDT
posted via StackOverflow

1 Answers

0
Best answer
 

As you allready discovered sqlite has no functions. So you will probably have to move some logic from the function and the single query out of your db into your app. This will probably mean executing a query looking at the result and based on that executing some more queries. So you can do the logic of the function in your app.

While this is not recommended in PostgreSQL as performance suffers from many small queries the performance loss in SQlite is much smaller as it is an embedded database (no communication overhead) and it's planner is more straight forward which makes the planning overhead of seperate queries smaller.

answered May 8, 2011 11:36 am CDT

Your answer

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect

Preview
Similar questions