Database (database/database.sqlite) does not exist. Database works from artisan tinker
You need to use full path, something like: DB_DATABASE=/home/laravel-project/database/database.sqlite
You need to use full path, something like: DB_DATABASE=/home/laravel-project/database/database.sqlite
The clob data type is unsupported in Postgres. However, it can be easily defined as a synonym to the text type: create domain clob as text;
They are not only different, they are orthogonal. Inconsistency: A DB that reported employee Joe Shmoe’s department as Sales but that didn’t list Joe Shmoe among the employees in the Sales department would be inconsistent. It’s a logical property of the DB, independent of the actual data. Integrity: A DB that reported jOe SaleS to … Read more
Probably one of the best explanations of SSTables and LSM-Trees for mortals is given by Martin Kleppmann in his “Designing Data-Intensive Applications” book. These data structures are explained in chapter 3, “Storage and Retrieval”, pages 69 through 79. It’s a really great read, I would recommend the whole book! Impatient ones could find my synopsis … Read more
If the query planner makes bad decisions it’s mostly one of two things: 1. The statistics are inaccurate. Do you run ANALYZE enough? Also popular in its combined form VACUUM ANALYZE. If autovacuum is on (which is the default in modern-day Postgres), ANALYZE is run automatically. But consider: Are regular VACUUM ANALYZE still recommended under … Read more
Yes. Ensures that you don’t have an orphan (entry with no parent), and depending on usage, if you define a cascading delete, when a parent is deleted, all its children will also be deleted. Disadvantage would be a slight performance hit just like any other foreign key.
OLD and NEW are null or not defined in a statement-level trigger. Per documentation: NEW Data type RECORD; variable holding the new database row for INSERT/UPDATE operations in row-level triggers. This variable is null in statement-level triggers and for DELETE operations. OLD Data type RECORD; variable holding the old database row for UPDATE/DELETE operations in … Read more
To get a table OID, cast to the object identifier type regclass (while connected to the same DB!). This finds the first table (or view etc.) with the given (unqualified) name along the search_path or raises an exception if not found: SELECT ‘mytbl’::regclass::oid; Schema-qualify the table name to remove the dependency on the search path: … Read more
The primary key is a column in a table. The primary key needs a unique value, which needs to come from somewhere. The sequence is a feature by some database products which just creates unique values. It just increments a value and returns it. The special thing about it is: there is no transaction isolation, … Read more
I think the solution to add following to .psqlrc is far from perfection \set ON_ERROR_STOP on there exists much more simple and convenient way – use psql with parameter: psql -v ON_ERROR_STOP=1 better to use also -X parameter turning off .psqlrc file usage. Works perfectly for me p.s. the solution found in great post from … Read more