Permalink
Browse files

in model.fcreate_tmp, DELETE removed

draft condition integrated in the create table statement.
  • Loading branch information...
1 parent d29f1b9 commit 735f2a5c532699017f3e0424b7c288f60617e7d4 @olivierch committed Apr 13, 2012
Showing with 27 additions and 19 deletions.
  1. +8 −1 doc/release-script
  2. +1 −1 src/flow--1.0.sql
  3. +18 −17 src/sql/model.sql
View
@@ -1,12 +1,19 @@
#!/bin/bash
+# $ cd openBarter
+# $ doc/release-script 0.3.1 0.3.2 > ~/.bash/do-release_0.3.2
+# $ chmod 777 ~/.bash/do-release_0.3.2
+# $ do-release_0.3.2
+# connect to https://manager.pgxn.org/upload
+# upload the file ../openbarter-0.3.2.tar.gz
last="$1"
new="$2"
echo "sed 's,MODULE_VERSION,$new,g' META.json.in > META.json"
echo "git commit -a -m 'preparation for v$new' "
-echo "git tag -s v$new"
+echo "git tag -s v$new -m 'release v$new'"
echo "git archive --format=tar --prefix=openbarter-$new/ v$new | gzip -9 > ../openbarter-$new.tar.gz"
echo "# git archive --format zip --prefix=openbarter-$new/ v$new --output ../openbarter-$new.zip"
echo "cp doc/doc-ob.pdf ../openbarter-doc-$new.pdf"
echo "git log --no-merges v$new ^v$last > ../ChangeLog-$new"
echo "git shortlog --no-merges v$new ^v$last > ../ShortLog-$new"
echo "git diff --stat --summary -M v$last v$new > ../diffstat-$new"
+echo "git push --tags"
View
@@ -10,7 +10,7 @@ AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE TYPE yflow (
- INTERNALLENGTH = variable, -- 400, -- 392, -- variable,
+ INTERNALLENGTH = variable,
INPUT = yflow_in,
OUTPUT = yflow_out,
ALIGNMENT = double
View
@@ -755,24 +755,25 @@ BEGIN
CREATE TEMPORARY TABLE _tmp /* ON COMMIT DROP */ AS (
*/
CREATE TEMPORARY TABLE _tmp ON COMMIT DROP AS (
- WITH RECURSIVE search_backward(id,ord,pat,np,nr) AS (
- SELECT _id,_ord,yflow_get(_ord),_np,_nr
- UNION ALL
- SELECT X.id,X.ord,
- yflow_get(X.ord,Y.pat), -- add the order at the begin of the yflow
- X.np,X.nr
- FROM search_backward Y,vorderinsert X
- WHERE yflow_follow(_MAXCYCLE,X.ord,Y.pat)
- -- X->Y === X.qtt>0 and X.np=Y[0].nr
- -- Y.pat does not contain X.ord
- -- len(X.ord+Y.path) <= _MAXCYCLE
- -- Y[!=-1]|->X === Y[i].np != X.nr with i!= -1
-
- )
- SELECT id,ord,nr,pat
- FROM search_backward LIMIT _MAXORDERFETCH --draft
+ SELECT A.id,A.ord,A.nr,A.pat FROM (
+ WITH RECURSIVE search_backward(id,ord,pat,np,nr) AS (
+ SELECT _id,_ord,yflow_get(_ord),_np,_nr
+ UNION ALL
+ SELECT X.id,X.ord,
+ yflow_get(X.ord,Y.pat), -- add the order at the begin of the yflow
+ X.np,X.nr
+ FROM search_backward Y,vorderinsert X
+ WHERE yflow_follow(_MAXCYCLE,X.ord,Y.pat)
+ -- X->Y === X.qtt>0 and X.np=Y[0].nr
+ -- Y.pat does not contain X.ord
+ -- len(X.ord+Y.path) <= _MAXCYCLE
+ -- Y[!=-1]|->X === Y[i].np != X.nr with i!= -1
+
+ )
+ SELECT id,ord,nr,pat
+ FROM search_backward LIMIT _MAXORDERFETCH --draft
+ ) A WHERE yflow_status(A.pat)=3
);
- DELETE FROM _tmp WHERE yflow_status(pat)!=3;
SELECT COUNT(*) INTO _cnt FROM _tmp;
RETURN _cnt;

0 comments on commit 735f2a5

Please sign in to comment.