Articles tagged with PostgreSQL
I recently learned while reading psycopg’s documentation (a Python driver for PostgreSQL), that you should use WHERE id = ANY(:values) instead of WHERE id IN :values when filtering over lists. That’s because the ANY operator works with empty list while IN doesn’t. Psycopg will also correctly adapt …
Read more...
How to create a database sequence that will be reset everyday? That is a sequence that will get one the first time of each day? It sounds easy but it's not that much.
Note
This article will focus on PostgreSQL since it's the database I use. A similar solution may …
Read more...
The basics
If you need to store a datetime range in Django (for instance from which day to which day a listing is valid), instead of relying on two fields like valid_from and valid_to, you can use a single field validity_range of type DateRangeField. This way, both values are stored …
Read more...
I'll detail here how to use one user to apply your migrations and one to run you site. This method can be applied to any framework and environment as long as your database is PostgreSQL. It's of course possible to do with other databases, but the SQL syntax to achieve …
Read more...
Je vous propose une solution pour vous aider à sauvegarder votre base de données PostgreSQL. La commande est pg_dump. Elle prend comme argument (au minimum) :
- Le nom d'utilisateur
- Le mot de passe
- Le nom de la base de données
- L'adresse IP du serveur
Donc la commande de base pour sauvegarder …
Lire la suite…
Framanews est un fork de ttrss, un lecteur de flux RSS en ligne. Il vous permet donc de consulter vos flux, de vous y abonner, … directement depuis un navigateur, où que vous soyez. Il dispose aussi d'une application Android. Il est évidement possible d'importer un fichier opml existant pour garder …
Lire la suite…