Re: [SQL] How to check postgres running or not ?

2004-09-18 Thread Worik
Assuming it is unix The command ps xau|grep post If it is running it will produce output like... [EMAIL PROTECTED]:~$ ps xau|grep post postgres 880 0.0 0.2 8580 740 ?SSep07 0:31 /usr/lib/postgresql/bin/postmaster postgres 887 0.0 0.2 9536 612 ?SSep07 0:

Re: [SQL] How to check postgres running or not ?

2004-09-18 Thread Gaetano Mendola
Sandeep Gaikwad wrote: Hello Sir, I want to know how to check whether postgres database is running or not ? when I give command like ./postmaster -i &, whether all databases in that postgres will run or any one [default] ? If any one, then how to detect that database ? Well, in t

Re: [SQL] How to check postgres running or not ?

2004-09-18 Thread Christopher Browne
In an attempt to throw the authorities off his trail, [EMAIL PROTECTED] ("Sandeep Gaikwad") transmitted: > Hello Sir, > I want to know how to check whether postgres database > is running or not ? when I give command like ./postmaster -i &, > whether all databases in that postgres

Re: [SQL] Sequence of SQL command execution involving triggers and stored procedures.

2004-09-18 Thread Tom Lane
"Omkar Rath" <[EMAIL PROTECTED]> writes: > Say there is a stored procedure i.e FUNCTION sp_foo(...) which has say, > SQL commands (any of SELECT,INSERT,UPDATE,DELETE) in its body, say S1 > followed by S2 then S3 Furthermore, execution of statement S2 > results in trigger functions getting invok

Re: [SQL] 1-byte integers

2004-09-18 Thread Greg Stark
stig erikson <[EMAIL PROTECTED]> writes: > how can i specify an integer to be one byte byte or even 4 bits long? > int1, int(1), tinyint are nowhere to be seen. > smallest i can find is smallint that is 2 bytes. There's a type called "char" (the double quotes are needed). It's used by postgres s

[SQL] Sequence of SQL command execution involving triggers and stored procedures.

2004-09-18 Thread Omkar Rath
Title: Message I am observing the following:   Say there is a stored procedure i.e FUNCTION sp_foo(...) which has say, SQL commands (any of SELECT,INSERT,UPDATE,DELETE) in its body, say S1 followed by S2 then S3 Furthermore, execution of statement S2 results in trigger functions getting

[SQL] How to check postgres running or not ?

2004-09-18 Thread Sandeep Gaikwad
Hello Sir, I want to know how to check whether postgres database is running or not ? when I give command like ./postmaster -i &, whether all databases in that postgres will run or any one [default] ? If any one, then how to detect that database ? Thanks and regards, Sandeep. ---

[SQL] 1-byte integers

2004-09-18 Thread stig erikson
how can i specify an integer to be one byte byte or even 4 bits long? int1, int(1), tinyint are nowhere to be seen. smallest i can find is smallint that is 2 bytes. in a table i will have a few columns with values between 0 and 15, so optimally i am looking for some kind of unsigned 4-bits, or (u

[SQL] Implicit Transactions

2004-09-18 Thread Chip Gobs
We are porting from Informix to PostgreSQL 7.4.5 and have noticed the following behavior. If we try to OPEN a CURSOR for an invalid SELECT statement in ECPG, we get an error, as expected. However, if we then attempt to OPEN another CURSOR for a valid statement, we get an error that says we ar

[SQL] PL/pgSQL multidimension (matrix) array in function

2004-09-18 Thread Sergio Fantinel
I found how to use, inside a PL/pgSQL function, a two-dimensions array (matrix). There is a limitation: the number of the 'columns' of the matrix is fixed at declaration time (in DECLARE section) and you need to manually initialize all the elements in the first 'row' of the matrix. The number of