[SQL] Re: SQL functions not locking properly?

2000-09-26 Thread Forest Wilkinson
Tom Lane wrote: >Hmm. If you do the same commands without wrapping them in an SQL >function, they operate as expected. I'll bet there's some nasty >interaction between the FOR UPDATE support and the way that SQL >functions twiddle the current-command counter. Sigh, another bug. > >You might tr

RE: [SQL] Repeatable reads

2000-09-26 Thread Mikheev, Vadim
Use SET TRANSACTION ISOLATION LEVEL SERIALIZABLE inside BEGIN/END block. Default is READ COMMITTED. Vadim > > It appears that postgres 7.0 does not support repeatable read for > transaction isolation. Is this planned? If so, when? > > -Michael > _

[SQL] Three Unrelated Questions

2000-09-26 Thread Josh Berkus
Folks, Here's three unrelated questions which have been bothering me: 1. What TYPE does one use in a Create Function statement to return a full dataset? (Create Function XXX AS VIEW? Create Function XXX AS TABLE?) 2. The Curval(), Setval() and Nextval() functions allow one to easily manage SER

Re: [SQL] Data Type precision

2000-09-26 Thread Jie Liang
Hi, there, You can use function: urldb=# select round(234.356534,2); round 234.36 (1 row) Jerome Raupach wrote: > CREATE TABLE TR (f1 FLOAT4, f2 INT4, f3 INT4) ; > > UPDATE TR SET f1=f2/f3::FLOAT4 ; > > f1 -> xx,xx - but I want f1 -> xx,xx. > (6,6)

[SQL] date is not equals to dia/month/year: what's wrong?

2000-09-26 Thread Edipo E. F. Melo
Hi friends, I was making a web app using Apache+PHP(4.0.1) and PostgreSQL 7.0.2, all running on OS/2 Warp FP12 (brazilian portuguese) and discovered the following: contas=> \d hipercard Table "hipercard" Attribute | Type |

Re: [SQL] Data Type precision

2000-09-26 Thread Karel Zak
/* * Karel Zak * [EMAIL PROTECTED] * http://home.zf.jcu.cz/~zakkr/ * C, PostgreSQL, PHP, WWW, http://docs.linux.cz * */ On Tue, 26 Sep 2000, Jerome Raupach wrote: > CREATE TABLE TR (f1 FLOAT4, f2 INT4, f3 INT4) ; > > UPDATE TR SET f1=f2/f3:

[SQL] Data Type precision

2000-09-26 Thread Jerome Raupach
CREATE TABLE TR (f1 FLOAT4, f2 INT4, f3 INT4) ; UPDATE TR SET f1=f2/f3::FLOAT4 ; f1 -> xx,xx - but I want f1 -> xx,xx. (6,6) (6,2) anybody can help me ? Thanks. Jerome.