Ok, I found what's append : 1/ current value of the sequence data are following :
scheduling=# select * from seq_id_fch; sequence_name | last_value | increment_by | max_value | min_value | cache_value | log_cnt | is_cycled | is_called ---------------+------------+--------------+------------+-----------+-------------+---------+-----------+----------- seq_id_fch | 1 | 1 | 2147483647 | 1 | 1 | 0 | f | t (1 row) 2/ Line 6083, we have a request to get these informations : SELECT sequence_name, last_value, increment_by, CASE WHEN increment_by > 0 AND max_value = 9223372036854775807 THEN NULL WHEN increment_by < 0 AND max_value = -1 THEN NULL ELSE max_value END AS max_value, CASE WHEN increment_by > 0 AND min_value = 1 THEN NULL WHEN increment_by < 0 AND min_value = -9223372036854775807 THEN NULL ELSE min_value END AS min_value, cache_value, is_cycled, is_called from seq_id_fch; sequence_name | last_value | increment_by | max_value | min_value | cache_value | is_cycled | is_called ---------------+------------+--------------+------------+-----------+-------------+-----------+----------- seq_id_fch | 1 | 1 | 2147483647 | | 1 | f | t As you can see, "min_value" is NULL because CASE WHEN increment_by (=1) > 0 AND min_value (=1) = 1 THEN NULL 3/ Line 6156, we're creating the request appendPQExpBuffer(query, "CREATE SEQUENCE %s\n START WITH %s\n INCREMENT BY %s\n", fmtId(tbinfo->relname), (called ? minv : last), incby); so, with values, it's seq:'seq_id_fch', [called : 1] ? [minv : '' (00000000)], [last : '1' (400303eb)] seq:'x', [called : 0] ? [minv : '' (00000000)], [last : '1' (400303e2)] and we create a request w/ a NULL pointer w/ "seq_id_fch" whereas it's ok for "x". I duno what is the goal of "is_called" field, it's the only difference b/w "x" and "seq_id_fch", and the only thing touching "seq_id_fch" is some granting. Anyway, I think the fault is on request line 6083 because we may create erroneous lines for nothing. Why can't we take directly informations from sequence data ? Bye Laurent ===== The misspelling master is on the Web. _________ 100 % Dictionnary Free ! / /( / Dico / / Pleins d'autres fautes sur /________/ / http://go.to/destroyedlolo (#######( / http://destroyedlolo.homeunix.org:8080 Quoi, des fautes d'orthographe! Pas possible ;-D. ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org