From 54b165349ffc6a71bf635f0a25d800cb25f568d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20A=2E=20Holm?= Date: Wed, 19 May 2010 03:07:51 +0200 Subject: [PATCH] Translate files in postgres/ to English MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Only messages and comments atm, there’s still some Norwegian function and view names left. 19dbf25a-62e3-11df-ab02-90e6ba3022ac --- postgres/create_table.sql | 4 +-- postgres/create_views.sql | 14 +++++----- postgres/distupdate.sql | 4 +-- postgres/div.txt | 4 +-- postgres/round_coor.sql | 4 +-- postgres/update_things.sql | 66 +++++++++++++++++++++++----------------------- 6 files changed, 48 insertions(+), 48 deletions(-) diff --git a/postgres/create_table.sql b/postgres/create_table.sql index cd6eeb5..c5a6483 100644 --- a/postgres/create_table.sql +++ b/postgres/create_table.sql @@ -60,8 +60,8 @@ CREATE TABLE events ( date timestamptz, coor point, descr text, - begindate timestamptz, -- Ganske eksakt tidspunt ved start - enddate timestamptz, -- Ganske eksakt tidspunkt ved slutt + begindate timestamptz, -- Pretty exact time when starting + enddate timestamptz, -- Pretty exact time when ending cabegin interval, caend interval, flags text[], diff --git a/postgres/create_views.sql b/postgres/create_views.sql index 0ddf966..a7886bc 100644 --- a/postgres/create_views.sql +++ b/postgres/create_views.sql @@ -1,7 +1,7 @@ -- create_views.sql -- File ID: 24babc2a-fafb-11dd-96fe-000475e441b9 --- siste_aar: List ut alle plasser siste år, DISTINCT ON name og hver uke +-- siste_aar: List all places from last year, DISTINCT ON name and every week CREATE OR REPLACE VIEW siste_aar -- {{{ AS SELECT * FROM ( SELECT DISTINCT ON ( @@ -12,7 +12,7 @@ CREATE OR REPLACE VIEW siste_aar -- {{{ ) AS s ORDER BY date; -- }}} --- siste_halvaar: List ut alle plasser siste halvår, DISTINCT ON name og hver uke +-- siste_halvaar: List all places from last six months, DISTINCT ON name and every week CREATE OR REPLACE VIEW siste_halvaar -- {{{ AS SELECT * FROM ( SELECT DISTINCT ON ( @@ -23,7 +23,7 @@ CREATE OR REPLACE VIEW siste_halvaar -- {{{ ) AS s ORDER BY date; -- }}} --- siste_maaned: List ut alle plasser siste måned, DISTINCT ON name og hver time +-- siste_maaned: List all places from last month, DISTINCT ON name and every hour CREATE OR REPLACE VIEW siste_maaned -- {{{ AS SELECT * FROM ( SELECT DISTINCT ON ( @@ -34,7 +34,7 @@ CREATE OR REPLACE VIEW siste_maaned -- {{{ ) AS s ORDER BY date; -- }}} --- siste_uke: List ut alle plasser siste uka, DISTINCT ON name og hver time +-- siste_uke: List all places from last week, DISTINCT ON name and every hour CREATE OR REPLACE VIEW siste_uke -- {{{ AS SELECT * FROM ( SELECT DISTINCT ON ( @@ -45,7 +45,7 @@ CREATE OR REPLACE VIEW siste_uke -- {{{ ) AS s ORDER BY date; -- }}} --- siste_dogn: List ut alle plasser siste døgn, DISTINCT ON name og hvert minutt +-- siste_dogn: List all places from the last 24 hours, DISTINCT ON name and every minute CREATE OR REPLACE VIEW siste_dogn -- {{{ AS SELECT * FROM ( SELECT DISTINCT ON ( @@ -112,7 +112,7 @@ CREATE OR REPLACE VIEW gpst AS -- {{{ AS gpst FROM logg; -- }}} --- ev: Lister ut events sammen med loggen. +-- ev: List events and the log CREATE OR REPLACE VIEW ev AS -- {{{ SELECT * FROM ( SELECT 'gps' AS flag, date, coor, name || ' (' || dist || ')' AS name, ele::numeric(8,1), NULL AS descr @@ -148,7 +148,7 @@ CREATE OR REPLACE VIEW media AS -- {{{ FROM lyd ORDER BY date; -- }}} --- wp: Lister ut veipunktene, sortert nord → sør, vest → øst +-- wp: List all waypoints, sorted north → south, west → east CREATE OR REPLACE VIEW wp AS -- {{{ SELECT coor AS coor, diff --git a/postgres/distupdate.sql b/postgres/distupdate.sql index ff2f5d2..de3aa43 100644 --- a/postgres/distupdate.sql +++ b/postgres/distupdate.sql @@ -3,7 +3,7 @@ BEGIN ISOLATION LEVEL SERIALIZABLE; \echo - \echo ================ Oppdater name og dist ================ + \echo ================ Update name and dist ================ UPDATE logg SET name = clname(coor), dist = cldist(coor) WHERE date > ( @@ -17,6 +17,6 @@ BEGIN ISOLATION LEVEL SERIALIZABLE; now(), (SELECT max(date) FROM logg) ); - \echo ================ Oppdater wayp.numpoints ================ + \echo ================ Update wayp.numpoints ================ UPDATE wayp SET numpoints = numpoints(name); COMMIT; diff --git a/postgres/div.txt b/postgres/div.txt index 9fe92b2..80f4a6a 100644 --- a/postgres/div.txt +++ b/postgres/div.txt @@ -1,11 +1,11 @@ div.txt File ID: 31b5014c-fafb-11dd-ab52-000475e441b9 -For å liste ut de nærmeste trackpunktene for en posisjon: +To list the closest track points from a coordinate: SELECT date, coor, name, dist, (point(60.30738,5.34574) <-> coor)::numeric AS avs FROM logg ORDER BY avs LIMIT 100; -Tida det tar for å oppdatere: +Time for updating: gps=# VACUUM ANALYZE ; VACUUM diff --git a/postgres/round_coor.sql b/postgres/round_coor.sql index 6c95533..51b5eff 100644 --- a/postgres/round_coor.sql +++ b/postgres/round_coor.sql @@ -1,9 +1,9 @@ -- round_coor.sql -- File ID: 46f9e76a-56db-11df-adc3-ec9b5bd3a10b --- Rund av loggen til seks desimaler -- {{{ +-- Round the trackpoint log to six decimal digits -- {{{ \echo -\echo ================ Rund av loggen til seks desimaler ================ +\echo ================ Round trackpoint coordinates to six decimal digits ================ UPDATE logg SET coor = point( round(coor[0]::numeric, 6), diff --git a/postgres/update_things.sql b/postgres/update_things.sql index aa6c7d1..9a23ffd 100644 --- a/postgres/update_things.sql +++ b/postgres/update_things.sql @@ -1,20 +1,20 @@ -- update_things.sql -- File ID: 4765dc0a-fafb-11dd-874c-000475e441b9 --- Rund av veipunkter til seks desimaler -- {{{ +-- Round waypoints to six decimal digits -- {{{ \echo -\echo ================ Rund av veipunkter til seks desimaler ================ +\echo ================ Round waypoints to six decimal digits ================ UPDATE wayp SET coor = point( round(coor[0]::numeric, 6), round(coor[1]::numeric, 6) ); -- }}} --- Fjern duplikater i wayp -- {{{ +-- Remove duplicates from wayp -- {{{ \echo -\echo ================ Fjern duplikater i wayp ================ +\echo ================ Remove duplicates from wayp ================ -COPY (SELECT '======== Antall i wayp før rensking: ' || count(*) from wayp) to STDOUT; +COPY (SELECT '======== Number of waypoints in wayp before cleanup: ' || count(*) from wayp) to STDOUT; BEGIN ISOLATION LEVEL SERIALIZABLE; CREATE TEMPORARY TABLE dupfri @@ -42,14 +42,14 @@ BEGIN ISOLATION LEVEL SERIALIZABLE; ); COMMIT; -COPY (SELECT '======== Antall i wayp etter rensking: ' || count(*) from wayp) to STDOUT; +COPY (SELECT '======== Number of waypoints in wayp after cleanup: ' || count(*) from wayp) to STDOUT; -- }}} --- Fjern duplikater i events -- {{{ +-- Remove duplicates from events -- {{{ \echo -\echo ================ Fjern duplikater i events ================ +\echo ================ Remove duplicates from events ================ -COPY (SELECT '======== Antall i events før rensking: ' || count(*) from events) to STDOUT; +COPY (SELECT '======== Event count before cleanup: ' || count(*) from events) to STDOUT; BEGIN ISOLATION LEVEL SERIALIZABLE; CREATE TEMPORARY TABLE dupfri @@ -67,28 +67,28 @@ BEGIN ISOLATION LEVEL SERIALIZABLE; ); COMMIT; -COPY (SELECT '======== Antall i events etter rensking: ' || count(*) from events) to STDOUT; +COPY (SELECT '======== Event count after cleanup: ' || count(*) from events) to STDOUT; -- }}} --- Oppdater koordinater for bilder -- {{{ +-- Update picture coordinates -- {{{ \echo -\echo ================ Oppdater koordinater for bilder ================ +\echo ================ Update picture coordinates ================ UPDATE pictures SET coor = findpos(date) WHERE coor IS NULL; -- }}} --- Rund av bildekoordinater -- {{{ -\echo ================ Rund av bildekoordinater ================ +-- Round picture coordinates -- {{{ +\echo ================ Round picture coordinates ================ UPDATE pictures SET coor = point( round(coor[0]::numeric, 6), round(coor[1]::numeric, 6) ); -- }}} --- Fjern duplikater i pictures -- {{{ +-- Remove duplicates from pictures -- {{{ \echo -\echo ================ Fjern duplikater i pictures ================ +\echo ================ Remove duplicates from pictures ================ -COPY (SELECT '======== Antall i pictures før rensking: ' || count(*) from pictures) to STDOUT; +COPY (SELECT '======== Picture count before cleanup: ' || count(*) from pictures) to STDOUT; BEGIN ISOLATION LEVEL SERIALIZABLE; CREATE TEMPORARY TABLE dupfri @@ -106,28 +106,28 @@ BEGIN ISOLATION LEVEL SERIALIZABLE; ); COMMIT; -COPY (SELECT '======== Antall i pictures etter rensking: ' || count(*) from pictures) to STDOUT; +COPY (SELECT '======== Picture count after cleanup: ' || count(*) from pictures) to STDOUT; -- }}} --- Oppdater koordinater for filmer -- {{{ +-- Update coordinates for films -- {{{ \echo -\echo ================ Oppdater koordinater for filmer ================ +\echo ================ Update coordinates for films ================ UPDATE film SET coor = findpos(date) WHERE coor IS NULL; -- }}} --- Rund av filmkoordinater -- {{{ -\echo ================ Rund av filmkoordinater ================ +-- Round film coordinates -- {{{ +\echo ================ Round film coordinates ================ UPDATE film SET coor = point( round(coor[0]::numeric, 6), round(coor[1]::numeric, 6) ); -- }}} --- Fjern duplikater i film -- {{{ +-- Remove duplicates from film -- {{{ \echo -\echo ================ Fjern duplikater i film ================ +\echo ================ Remove duplicates from film ================ -COPY (SELECT '======== Antall i film før rensking: ' || count(*) from film) to STDOUT; +COPY (SELECT '======== Film count before cleanup: ' || count(*) from film) to STDOUT; BEGIN ISOLATION LEVEL SERIALIZABLE; CREATE TEMPORARY TABLE dupfri @@ -145,28 +145,28 @@ BEGIN ISOLATION LEVEL SERIALIZABLE; ); COMMIT; -COPY (SELECT '======== Antall i film etter rensking: ' || count(*) from film) to STDOUT; +COPY (SELECT '======== Film count after cleanup: ' || count(*) from film) to STDOUT; -- }}} -- Oppdater koordinater for lyd -- {{{ \echo -\echo ================ Oppdater koordinater for lyd ================ +\echo ================ Update sound coordinates ================ UPDATE lyd SET coor = findpos(date) WHERE coor IS NULL; -- }}} --- Rund av lydkoordinater -- {{{ -\echo ================ Rund av lydkoordinater ================ +-- Update sound coordinates -- {{{ +\echo ================ Update sound coordinates ================ UPDATE lyd SET coor = point( round(coor[0]::numeric, 6), round(coor[1]::numeric, 6) ); -- }}} --- Fjern duplikater i lyd -- {{{ +-- Remove duplicates from sound -- {{{ \echo -\echo ================ Fjern duplikater i lyd ================ +\echo ================ Remove duplicates from sound ================ -COPY (SELECT '======== Antall i lyd før rensking: ' || count(*) from lyd) to STDOUT; +COPY (SELECT '======== Sound count before cleanup: ' || count(*) from lyd) to STDOUT; BEGIN ISOLATION LEVEL SERIALIZABLE; CREATE TEMPORARY TABLE dupfri @@ -184,7 +184,7 @@ BEGIN ISOLATION LEVEL SERIALIZABLE; ); COMMIT; -COPY (SELECT '======== Antall i lyd etter rensking: ' || count(*) from lyd) to STDOUT; +COPY (SELECT '======== Sound count after cleanup: ' || count(*) from lyd) to STDOUT; -- }}} \i distupdate.sql -- 2.11.4.GIT