[SQL] Problem in SQL Trigger

2004-04-29 Thread Ramesh Patel
Hii have one problem in Trigger.this trigger alread workon Red Hat Linux 7.3 but now i shift to RHL9.0in RHL 9.0  notworking . in this problem in ROUND function.but how to i slove thisi dont know. so please help me.This is  Function andTrigger./// Function

Re: [SQL] Multi ordered select and indexing

2004-04-29 Thread Christoph Haller
Have you thought of using a functional index on both columns? Regards, Christoph Hi! What is the simplest solution for this query type: SELECT * FROM tablename ORDER BY col1 ASC, col2 DESC; In our experience, postgres cannot use a multi-colum index on (col1, col2) in this

[SQL] Equivalant of SQL Server's Nchar and NVARCHAR

2004-04-29 Thread kumar
Dear friends, Is there any equivalent datatype of SQL Server's NCHAR and NVARCHAR, available with Postgres 7.3.4. I want to store characters, special characters and Numbers. Please shed some light. Thanks Kumar

Re: [SQL] Equivalant of SQL Server's Nchar and NVARCHAR

2004-04-29 Thread Karsten Hilbert
Dear friends, Is there [...] Please shed some light. http://www.postgresql.org/docs/7.4/static/index.html Thanks You are welcome. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 ---(end of

Re: [SQL] Equivalant of SQL Server's Nchar and NVARCHAR

2004-04-29 Thread Rob
kumar wrote: Dear friends, Is there any equivalent datatype of SQL Server's NCHAR and NVARCHAR, available with Postgres 7.3.4. I want to store characters, special characters and Numbers. Please shed some light. Thanks Kumar I only only use ascii but... I believe postgresql varchar is the same

Re: [SQL] Use arrays or not?

2004-04-29 Thread Josh Berkus
Roelant, Yours is not a performance question, so I'm crossing it over to SQL for advice on database design. I am building an application using postgresql to store XML-records. There is a debate within the group of developers about the best way to store our data. I hope you can help us make a

[SQL] Check a value in array

2004-04-29 Thread Marco Lazzeri
Hi all. I have to check if a value is in an array. I've got a date array in a table and I would like to perform queries like: SELECT * FROM table WHERE date IN dates_array; I've tried using array_contains_date (contrib/array_iterator.sql) function unsuccessfully: SELECT

Re: [SQL] Check a value in array

2004-04-29 Thread Rod Taylor
On Thu, 2004-04-29 at 13:37, Marco Lazzeri wrote: Hi all. I have to check if a value is in an array. I've got a date array in a table and I would like to perform queries like: SELECT * FROM table WHERE date IN dates_array; If you're using 7.4 or later, try: SELECT * FROM table

Re: [SQL] Equivalant of SQL Server's Nchar and NVARCHAR

2004-04-29 Thread Josh Berkus
Kumar, I only only use ascii but... I believe postgresql varchar is the same as Oracle/Sybase/MS SQL nvarchar even though it doesn't explicitly say so here: All of our TEXT datatypes are multibyte-capable, provided you've installed PostgreSQL correctly.This includes: TEXT (recommended)

Re: [SQL] Multi ordered select and indexing

2004-04-29 Thread Tom Lane
Antal Attila [EMAIL PROTECTED] writes: CREATE OPERATOR CLASS int4_reverse_order_ops FOR TYPE int4 USING btree AS OPERATOR1 / , OPERATOR2 /= , OPERATOR3 /= , OPERATOR4 /= ,

[SQL] Permissions not working

2004-04-29 Thread Pallav Kalva
Hi , I am having some problems with setting up permissions in Postgres. I have a database for ex: 'ups' and it was owned previously by 'postgres(superuser)' but now i have changed the ownership to new user 'ups' all the tables are owned by these user 'ups'. This database doesnt have any

Re: [SQL] Use arrays or not?

2004-04-29 Thread Josh Berkus
Roelant, So, let me rephrase my questions: 1. When and why would anyone use arrays? When the data itself is an ordered set of items which is indivisible and lacks meaning outside the ordered set. For example, a set of ordered pairs of molecules in a gene snippet. Or a mathematical matrix.

Re: [SQL] Permissions not working

2004-04-29 Thread scott.marlowe
On Thu, 29 Apr 2004, Pallav Kalva wrote: Hi , I am having some problems with setting up permissions in Postgres. I have a database for ex: 'ups' and it was owned previously by 'postgres(superuser)' but now i have changed the ownership to new user 'ups' all the tables are owned by

Re: [SQL] Permissions not working

2004-04-29 Thread Pallav Kalva
scott.marlowe wrote: On Thu, 29 Apr 2004, Pallav Kalva wrote: Hi , I am having some problems with setting up permissions in Postgres. I have a database for ex: 'ups' and it was owned previously by 'postgres(superuser)' but now i have changed the ownership to new user 'ups' all the tables

Re: [SQL] Permissions not working

2004-04-29 Thread scott.marlowe
On Thu, 29 Apr 2004, Pallav Kalva wrote: scott.marlowe wrote: On Thu, 29 Apr 2004, Pallav Kalva wrote: Hi , I am having some problems with setting up permissions in Postgres. I have a database for ex: 'ups' and it was owned previously by 'postgres(superuser)' but now i

[SQL] isnumeric() function?

2004-04-29 Thread Yudie
What is isnumeric function in postgresql? I'm using psql version 7.2.2 thanks Yudie ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])

Re: [SQL] Permissions not working

2004-04-29 Thread Tom Lane
Pallav Kalva [EMAIL PROTECTED] writes: I have a database for ex: 'ups' and it was owned previously by 'postgres(superuser)' but now i have changed the ownership to new user 'ups' all the tables are owned by these user 'ups'. That isn't a supported operation. How did you do it exactly? I