Extensions
- anon 0.0.1
- Luhn algorithm implementation for Postgres
Documentation
- LICENSE
- The PostgreSQL License
README
pg_luhn
A pure SQL implementation of the Luhn Algorithm
Example
```sql SELECT luhn_verify(5432);
luhn_verify
f (1 row)
SELECT luhn_verify(5439);
luhn_verify
t (1 row)
postgres=# SELECT luhn_generate(543);
luhn_generate
5439
```
Install
make
make install
Once the extension is installed on the server, you can create it inside the database.
sql
CREATE EXTENSION pg_luhn;
Credits
This extension is based on the work of Craig Ringer published on the PostgreSQL Wiki