[SQL] Test

2000-08-28 Thread Stuart Foster
Please ignore. Thanks

Re: [SQL] pg_attribute_relid_attnam_index problem after log disk filled up

2000-08-28 Thread Palle Girgensohn
Tom Lane wrote: > > Palle Girgensohn <[EMAIL PROTECTED]> writes: > > What's this? What to do? Shall I bother? > > > pp=> vacuum; > > NOTICE: Index pg_attribute_relid_attnam_index: NUMBER OF > > INDEX' TUPLES (3094) IS NOT THE SAME AS HEAP' (3093) > > Under 6.5, if vacuum doesn't get rid of the

Re: [SQL] Can I get this all in one query?

2000-08-28 Thread Renato De Giovanni
I don't have a postgresql instalation right now to do some tests, but maybe it works... SELECT crs.dept AS department, ROUND(AVG(CAST(rvs1.score AS FLOAT)) ,2) AS snooze, ROUND(AVG(CAST(rvs2.score AS FLOAT)) ,2) AS professional, ROUND(AVG(CAST(rvs3.score AS FLOAT)) ,2) AS per

Re: [SQL] better way

2000-08-28 Thread Renato De Giovanni
Didn't test this, but I think it should also work: SELECT a.oid_fld FROM for_payment a, for_payment b WHERE b.serial_fld = 2 AND b.char_fld = a.char_fld AND a.serial_fld <> 2 -- Renato Sao Paulo - SP - Brasil [EMAIL PROTECTED] > Is there a better way to write this: > > SELECT a.oid_fld FROM for

Re: [SQL] pg_attribute_relid_attnam_index problem after log disk filled up

2000-08-28 Thread Tom Lane
Palle Girgensohn <[EMAIL PROTECTED]> writes: > What's this? What to do? Shall I bother? > pp=> vacuum; > NOTICE: Index pg_attribute_relid_attnam_index: NUMBER OF > INDEX' TUPLES (3094) IS NOT THE SAME AS HEAP' (3093) Under 6.5, if vacuum doesn't get rid of the message then I think the only way

[SQL] pg_attribute_relid_attnam_index problem after log disk filled up

2000-08-28 Thread Palle Girgensohn
Hi! What's this? What to do? Shall I bother? pp=> vacuum; NOTICE: Index pg_attribute_relid_attnam_index: NUMBER OF INDEX' TUPLES (3094) IS NOT THE SAME AS HEAP' (3093) The database is rather large, and the time to run vacuum is too short, so it feels like something is stopping the vacuum too e

[SQL] better way

2000-08-28 Thread Sherwin Daganato
Is there a better way to write this: SELECT a.oid_fld FROM for_payment a WHERE a.serial_fld <> 2 AND EXISTS (SELECT b.char_fld FROM for_payment b WHERE b.serial_fld = 2 AND b.char_fld = a.char_fld) Table for_payment +-++---+ | serial_fld | char_fld | oid_fld

Re: [SQL] shared memory leak in 7.0.2?

2000-08-28 Thread Pierre Padovani
Tom, Thanks for that command. I never knew that existed. The only reason I blame postgres at this point, is that the only thing that has changed on this machine in the past month was upgrading postgres to 7.0.2 as well as upgrading perl. Of the two perl is used not nearyl as much as postgres.

Re: [SQL] shared memory leak in 7.0.2?

2000-08-28 Thread Tom Lane
Pierre Padovani <[EMAIL PROTECTED]> writes: > Here is the current output of that ipc command: Looks pretty reasonable --- the three shmem segments look to be about what postgres should be using (I take it you've got -B set to 350 or so). > If postgres were to crash for some reason. Would the

Re: [SQL] shared memory leak in 7.0.2?

2000-08-28 Thread Tom Lane
[EMAIL PROTECTED] writes: > i've been running 7.0.2 for the last month or so, and I've had to > reboot my redhat linux box twice to clear up a shared memory leak > issue. Essentially with the DB running for about 2weeks with large > amounts of usage, eventually the Os runs out of shared memory a

Re: [SQL] Tutorial

2000-08-28 Thread Christopher Sawtell
On Fri, 25 Aug 2000, Alessandro Valenti wrote: > Does someone know a free downloadable tutorial on RDBMS usage for > beginners? This is Bruce Momjian's book. It's pretty good, Bruce has a good command of English. It's intended to be a beginners guide. You will need the Adobe Acrobat reader to vie

Re: [SQL] Sql and paradox

2000-08-28 Thread Fabrice Scemama
> Lalit wrote: > > I want to know the incompatibilities between Paradox text files and > SQL database. None. Paradox databases are clean.

[SQL] Can I get this all in one query?

2000-08-28 Thread Richard Rowell
I'm designing a database/website that will allow students to "grade" the professors/classes the students attend. There are eight different "factors" that the students assign grades on. Until tonight I had one table that kept the scores assigned by students. This table name REVIEW had a field n

[SQL] Re: Argument variables for select

2000-08-28 Thread Andreas Tille
On Mon, 28 Aug 2000, Yury Don wrote: > Andreas Tille wrote: > > > > Create Function VarSelect ( varchar, varchar ) > >returns int > >As ' > > Declare num int ; > > > > Begin > >Select Into num Count(*) From $1 Where $2 ; > >return num; > > End ; > >' l

Re: [SQL] Argument variables for select

2000-08-28 Thread Yury Don
Andreas Tille wrote: > > Hello, > > I want to use the following construct in a stored function: > > Create Function VarSelect ( varchar, varchar ) >returns int >As ' > Declare num int ; > > Begin >Select Into num Count(*) From $1 Where $2 ; >return num; >

[SQL] shared memory leak in 7.0.2?

2000-08-28 Thread pierre
All, i've been running 7.0.2 for the last month or so, and I've had to reboot my redhat linux box twice to clear up a shared memory leak issue. Essentially with the DB running for about 2weeks with large amounts of usage, eventually the Os runs out of shared memory and the db crashes and fails

[SQL] Argument variables for select

2000-08-28 Thread Andreas Tille
Hello, I want to use the following construct in a stored function: Create Function VarSelect ( varchar, varchar ) returns int As ' Declare num int ; Begin Select Into num Count(*) From $1 Where $2 ; return num; End ; ' language 'plpgsql' ; Could someo

[SQL] Tutorial

2000-08-28 Thread Alessandro Valenti
Does someone know a free downloadable tutorial on RDBMS usage for beginners? thanks, Alessandro

Re: [SQL] Regular expression query

2000-08-28 Thread Oliver Seidel
> The regexp package we currently use implements POSIX 1003.2 regexps > (see src/backend/regex/re_format.7). I believe there is an item on the > TODO list about upgrading the regexp parser to something more modern > ... feel free to hop on that project if it's bugging you ... I would like to rec

Re: [SQL] Re: [GENERAL] Getting the result of a query using COUNT(*)

2000-08-28 Thread Alexandru COSTIN
Hello Try this way: SELECT COUNT(*) as no FROM MyTable rs.getint("no"); Or SELECT COUNT(*) FROM MyTable rs.getInt(0); (or (1)) alexander > Jackson Ching wrote: > > > > Hi, > > > > I'm using JSDK 2.0 and IBM JDK 1.3 on Red

[SQL] Re: [GENERAL] sorting in UNICODE table

2000-08-28 Thread Tatsuo Ishii
> I'm use postgresql-7.0.2. It's compiled with unicode support > (./configure --enable-multibyte=UNICODE ...) > I have a table which contains both latin and non-latin letters. All they are in >UTF-8 encoding. When > I try to sort the rows > > ( SELECT * FROM my_table ORDER BY sort_field ) > > I