Re: [SQL] Postgres 8.0.1 on Solaris 10 Sparc: library -lgcc_s: not

2005-04-29 Thread Rainer J. H. Brandt
Hello. You (Dinesh Pandey) wrote: I am installing Postgres 8.0.1 on Solaris 10 Sparc: [...] I am getting this error [...] ld: fatal: library -lgcc_s: not found How did you configure? I built 8.0.2 using ./configure --prefix=/opt/local (i.e. nothing special) on a fresh Solaris 10 03/05

Re: [SQL] Help to drop table

2005-04-29 Thread Igor Kryltsov
DROP TABLE Facility Info Thank you, Igor Michael Fuhr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Fri, Apr 22, 2005 at 03:24:10PM +1000, Igor Kryltsov wrote: Please help to drop table with soace inside name. List of relations Schema |

[SQL] Division in Postgre

2005-04-29 Thread tuan
In sql server my division select cast(3 as float)/10 is 0.299. But in postgres select cast(3 as float8)/10 is 0.3. How to get result like sql server? Thank you. Sorry for my english ---(end of broadcast)--- TIP 5: Have you checked our

[SQL] Build issues: -static builds resulting initdb problems

2005-04-29 Thread Metin Ozisik
Version: 8.0.2 Platforms: Linux, Fedora Core 2, Suse 9.2, Mandrake 10.1 Build time parameter: CFLAGS="-static" ./configure results in a staticly linked binaries. (you are supposed to have static lib versions of readline, ncurses, etc, etc. of course) However, conversion shared objects

[SQL] can someone jelp me on this?

2005-04-29 Thread Lord Knight of the Black Rose
hey guys I have a question that I couldnt maneged to solve for the last 4 days. Im kinda new to these stuff so dont have fun with me if it was so easy. Ok now heres the question. create table student (student_id int not null, student_name varchar(25), student_affiliation int, student_password

Re: [SQL] Coming from Oracle SQL

2005-04-29 Thread Veronica L Bounmixay
Thank you Mike - and SO SORRY all! I'm a newbie to this forum and the style is not customary to me! :-) Thanks again! Ronni Michael Fuhr [EMAIL PROTECTED] 04/25/2005 03:36 PM Please respond to pgsql-sql@postgresql.org To Veronica L Bounmixay [EMAIL PROTECTED] cc

[SQL] Question about update syntaxt

2005-04-29 Thread Michael M Friedel
I am trying to use an application (Through ODBC) that uses the following update syntax UPDATE MyTable SET MyTable.id=2 WHERE id=1 unfortunatly I get an error message ERROR: column mytable of relation mytable does not exist Question is, is ther something I can configure that will make

Re: [SQL] UPDATE WITH ORDER BY

2005-04-29 Thread Ramakrishnan Muralidharan
Hi, To my knowledge it is not possible to sort and update the code in a single update statement. I have done it through a simple function. I have given the function below. CREATE OR REPLACE FUNCTION SortCode()RETURNS INT4 AS $$DECLARE rRec RECORD;BEGIN PERFORM SETVAL( 'test1_code_seq'

Re: [SQL] Looking for a way to sum integer arrays....

2005-04-29 Thread Tony Wasson
Thank you for the responses! To recap: pl/r array support works very well. In my case, I am looking for pl/pgsql solution. I also got this nice function from dennisb on the #postgresql irc channel, which seems extremely clean and works with 7.4/8.0. My original function didn't handle a blank

[SQL] Postgres 8.0.0 - unknown log string

2005-04-29 Thread Mauro Bertoli
Hi, I found in my postges 8.0 logs (/var/lib/pgsql/data/pg_log/postgresql-Thu.log) LOG: incomplete startup packet LOG: incomplete startup packet very very times. What's it? I did't found answers in the postgres documentation. Can someone explain me about it? Thanks, Mauro B.

[SQL] multi-column unique constraints with nullable columns

2005-04-29 Thread Tornroth, Phill
I have many tables who's natural key includes a nullable column. In this cases it's a soft-delete or 'deprecated' date time. I'd like to add a table constraint enforcing this constraint without writing a custom procedure, but I've found that postgres treats NULLs very consistently with respect

Re: [SQL] Looking for a way to sum integer arrays....

2005-04-29 Thread Ramakrishnan Muralidharan
Hi, CREATE OR REPLACE FUNCTION SUM_ARR( aArr1 Integer[] , aArr2 Integer[] ) RETURNS Integer[] AS $$ DECLARE aRetu Integer[]; BEGIN -- Initialize the Return array with first array value. FOR i IN array_lower( aArr1 )..array_upper( aArr1 ) LOOP array_append( aRetu , aArr1[i] ); END

[SQL] PHP postgres connections

2005-04-29 Thread Mauro Bertoli
Hi, I need to connect to 2 differents Postgres 8.0.0 databases located in the same machine using the same PHP script with an db wrapper object instance (pg_Connect)... simply a PHP page with contemporarily 2 database connections... What's the best practice ? Can I use however persistent

Re: [SQL] people who buy A, also buy C, D, E

2005-04-29 Thread Ramakrishnan Muralidharan
Hi I am bit confused.. If you want to display first 5 the following query will fetch top 5 book id's. I am not able to understand, why there is a sub-query. SELECT ELEMENT_ID , COUNT( * ) FROM WATCH_LIST_ELEMENT GROUP BY ELEMENT_ID ORDER BY COUNT(*) DESC LIMIT 5 Regards,

Re: [SQL] trigger/rule question

2005-04-29 Thread Ramakrishnan Muralidharan
Hi, Going through you mail, I assume that you are updating the mtime only after inserting the record. It is always possible to check the mtime filed value of the inserted record and take action based on it in the trigger. Is it possible to send me detail about the trigger? Regards,

Re: [SQL] Question about update syntaxt

2005-04-29 Thread Stephan Szabo
On Fri, 29 Apr 2005, Michael M Friedel wrote: I am trying to use an application (Through ODBC) that uses the following update syntax UPDATE MyTable SET MyTable.id=2 WHERE id=1 unfortunatly I get an error message ERROR: column mytable of relation mytable does not exist Question is, is

Re: [SQL] Division in Postgre

2005-04-29 Thread Stephan Szabo
On Sun, 24 Apr 2005, tuan wrote: In sql server my division select cast(3 as float)/10 is 0.299. But in postgres select cast(3 as float8)/10 is 0.3. How to get result like sql server? I believe you can control what precision is used in printing the float results with

Re: [SQL] multi-column unique constraints with nullable columns

2005-04-29 Thread Stephan Szabo
On Fri, 29 Apr 2005, Tornroth, Phill wrote: I have many tables who's natural key includes a nullable column. In this cases it's a soft-delete or 'deprecated' date time. I'd like to add a table constraint enforcing this constraint without writing a custom procedure, but I've found that

Re: [SQL] PHP postgres connections

2005-04-29 Thread Yasir Malik
Hi, I need to connect to 2 differents Postgres 8.0.0 databases located in the same machine using the same PHP script with an db wrapper object instance (pg_Connect)... simply a PHP page with contemporarily 2 database connections... I don't think this is the right place to ask this, but there's an

Re: [SQL] Build issues: -static builds resulting initdb problems

2005-04-29 Thread Tom Lane
Metin Ozisik [EMAIL PROTECTED] writes: Build time parameter: CFLAGS=-static ./configure Is there a particular reason for you to be doing that? creating conversions ... FATAL: could not load library = ../ascii_and_misc.so: ../../ascii_and_misc.so: undefined symbol: = pg_mic2ascii