Hello all,

CREATE USER/ALTER USER doesn't work well for 
99/02/23 snapshot;

=> create user user1;
ERROR:  Bad abstime external representation ''

I didn't understand the reason.
 
=> alter user fred createuser;
ERROR:  parser: parse error at or near "where"

I found it's because of the use snprintf() instead 
of sprintf().  Different from sprintf(),snprintf() 
clears its target first. 
AlterUser() function uses the statement such as
 
	snprintf(sql, "....", sql, ...) 

In this case,the content of sql which is also a 
source of snprintf is cleared before execution.

Thanks. 

Hiroshi Inoue
Inoue@tpf.co.jp

Tue, 16 Mar 1999 11:44:05 +0900
"Hiroshi Inoue" <Inoue@tpf.co.jp>
snprintf() instead of sprintf() ?
I have gone through the code, and added pstrdup() to cases where
snprintf was uses with the same string on input and output.  Should fix
these problems.


---------------------------------------------------------------------------

Hello all,

CREATE USER/ALTER USER doesn't work well for 
99/02/23 snapshot;

=> create user user1;
ERROR:  Bad abstime external representation ''

I didn't understand the reason.
 
=> alter user fred createuser;
ERROR:  parser: parse error at or near "where"

I found it's because of the use snprintf() instead 
of sprintf().  Different from sprintf(),snprintf() 
clears its target first. 
AlterUser() function uses the statement such as
 
	snprintf(sql, "....", sql, ...) 

In this case,the content of sql which is also a 
source of snprintf is cleared before execution.

Thanks. 

Hiroshi Inoue
Inoue@tpf.co.jp




-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 16 Mar 1999 00:01:36 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] snprintf() instead of sprintf() ?