Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
apisub
Commits
a984270b
Commit
a984270b
authored
Dec 16, 2018
by
Stephane Crozat
Browse files
Mise en forme README
parent
4b95a1ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmp/import/README.md
View file @
a984270b
...
...
@@ -4,6 +4,7 @@
su postgres
psql
```
\c postgres
DROP DATABASE apisub;
CREATE DATABASE apisub WITH OWNER apisub;
...
...
@@ -12,6 +13,7 @@ BEGIN;
\i /home/stc/Bureau/apisub20181213.sql
SELECT pg_catalog.set_config('search_path', 'public', false);
COMMIT;
```
## Sync des inscriptions arbitrées sur tableur
...
...
@@ -19,6 +21,7 @@ COMMIT;
2.
Enregistrer sous ; format CSV ; paramètres du filtre (UTF-8 et séparateur ;)
3.
Importer dans une table finalsub
```
BEGIN;
CREATE TABLE finalsub (
api INTEGER NOT NULL,
...
...
@@ -26,9 +29,11 @@ CREATE TABLE finalsub (
PRIMARY KEY (api,utclogin));
COPY finalsub FROM '/home/stc/Bureau/api_sub_final.csv' WITH CSV HEADER DELIMITER ';';
COMMIT;
```
### Inscriptions
```
SELECT
'echo ''Bonjour ' ||
firstname || ' ' || surname ||
...
...
@@ -42,9 +47,11 @@ ON vapi.code=finalsub.api
JOIN localuser
ON localuser.utclogin=finalsub.utclogin
ORDER BY surname;
```
### Non-inscrit
```
CREATE VIEW vnosub AS
SELECT utclogin FROM subscribe
EXCEPT
...
...
@@ -59,3 +66,4 @@ FROM vnosub
JOIN localuser
ON localuser.utclogin=vnosub.utclogin
ORDER BY vnosub.utclogin;
```
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment