[SQL] partial index on non default tablespace syntax

2005-06-18 Thread Rajesh Kumar Mallah
Hi, Looks like its not possible to specify tablespace of an index with a where clause, we require to create the index, and then use ALTER INDEX for setting the tablespace. Is it something that is already known or its itentional so as to keep the command unambigious. i also could not find it in

Re: [SQL] partial index on non default tablespace syntax

2005-06-18 Thread Michael Fuhr
On Sat, Jun 18, 2005 at 10:24:06PM +0530, Rajesh Kumar Mallah wrote: Looks like its not possible to specify tablespace of an index with a where clause, Could you show the command you're running and the error you get, or otherwise explain what problem you're seeing? Is the following not what

Re: [SQL] partial index on non default tablespace syntax

2005-06-18 Thread Tom Lane
Rajesh Kumar Mallah [EMAIL PROTECTED] writes: Looks like its not possible to specify tablespace of an index with a where clause, Hm? regression=# create table foo(f1 int, f2 int); CREATE TABLE regression=# create index fooi on foo (f1) tablespace pg_default where f2 0; CREATE INDEX (I hadn't

[SQL] Set Membership operator -- test group membership

2005-06-18 Thread Sophie Yang
Say I have a table tbl1 with two columns: tbl1(a integer, b integer, c integer) I want to select the rows in which a and b are members of a list of integer pairs. The SQL in my mind is something like: select * from tbl1 where (a, b) in ((1, 20), (2, 30), (3, 50)); I know the SQL above does

[SQL] AYUDA CON LA INSTALACION DEL POSTGRESQL

2005-06-18 Thread Steph Frias
Inicie la instalacion del PostgreSQL 7.3.10 como dice el install: ./configure gmake su gmake install adduser postgres mkdir /usr/local/pgsql/data chown postgres /usr/local/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data /usr/local/pgsql/bin/postmaster -D

[SQL] Looking for info on 8.1 features, and some examples

2005-06-18 Thread Larry Meadors
I am looking at the features for pgsql 8.1 (based on what I read in http://gborg.postgresql.org/project/pljava/projdisplay.php), and am wondering if anyone reading this has a simple example of some procedures that use OUT and INOUT parameters that they would be willing to share... Larry

[SQL] Dynamic PL/pgSQL

2005-06-18 Thread Ruediger Herrmann
I plan to run an SQL script - using JDBC - to initialize a database. Right now I have the need to execute serveral statements only under certain conditions. for example: IF NOT EXISTS ( SELECT 1 FROM pg_catalog.pg_user WHERE ussername = 'Jon' ) THEN CREATE USER 'Jon'; END IF;

Re: [SQL] [GENERAL] Set Membership operator -- test group membership

2005-06-18 Thread Igor Katrayev
Sophie, The sql like this: select * from tbl1 where (a, b) in ((1, 20), (2, 30), (3, 50)); works very well in PostgreSQL 8, Sincerely, Igor Katrayev, Data Systems Manager North Pacific Research Board 1007 West Third Avenue, Suite 100 Anchorage, AK 99501 Phone: 907-644-6700 Fax: 907-644-6780

Re: [SQL] Putting an INDEX on a boolean field?

2005-06-18 Thread Erik Aronesty
In my database, the sites table is large, and the usersites table has only a few sites per userid - so it should be looked in first. I'm surprised that I had to juggle my query around (below), rather than trusting the optimizer to figure this out for me. Should I start looking to figure out why

[SQL] WHY transaction waits for another transaction?

2005-06-18 Thread Vilinski Vladimir
Hallo I'm porting one Oracle Application to Postgres. This Programm uses long living Transactions. During the execution of transaction Nr:10295 (PID:18430) one new transaction with Nr:10339 (PID:18431) starts, that writes one record into the table. But this new transaction never stops, because

Re: [SQL] Returning a Cross Tab record set from a function

2005-06-18 Thread Marc Wrubleski
Hi All, thanks for your responses. I know higher level languages can perform the operation, but I think a function written in a higher level language could still not return a resulting (structure undefined) table back as a result set. I hope I am wrong about this ;-) If not, read on... My