[SQL] Decimal vs.Numeric vs. Int & type for OID

2000-12-12 Thread Nikhil G. Daddikar
Hi, It is unclear to me what the real difference is and when to use what. Any pointers would be greatly appreaciated. Thanks! -ngd.

Re: [SQL] Persistent Connects (pg_pconnect)

2000-12-12 Thread Luca Pregliasco
Colleen Williams wrote: > However we had another problem, the solution with using pg_connect instead > of pg_pconnect worked on DEV but not on PROD. We think it is to do with > different PHP versions. DEV was using PHP4.0.1p2 and PROD was using > PHP4.0.3p1. We think maybe there is a variable sco

Re: [SQL] SQL parse error

2000-12-12 Thread Borek Lupoměský
On Tue, 12 Dec 2000, Tom Lane wrote: TL> I can't duplicate the problem either. I tried: TL> TL> play=> select substring(cp from 1 for 4)::int4 from out2cp; TL> ?column? TL> -- TL> 3182 TL> 3182 TL> (2 rows) TL> TL> Does anyone else see a failure with this? If so what platfo

[SQL] select ... for update

2000-12-12 Thread Jie Liang
> Hi, How can I use select ... for update to update limit to update what I select?? somewhat like: select url,id from mytable for update order by priority,id limit 5; I want update the id in above return like: update mytable set allocatedto='whatever' where id in above return set. Could I do it i

Re: [SQL] SQL parse error

2000-12-12 Thread Tom Lane
=?ISO-8859-2?Q?Borek_Lupom=ECsk=FD?= <[EMAIL PROTECTED]> writes: > On Tue, 12 Dec 2000, Francis Solomon wrote: FS> What version of PostgreSQL are you using? This works fine for me on FS> 7.02. Time to update, maybe? >Does not seem to be the case... > ld01ad02:~$ rpm -q postgresql > postgresq

Re: [SQL] plpgsql

2000-12-12 Thread Jie Liang
OO, That's a big disadvantage, because if the table is huge, using select stmt walking even on an index will take some time and duplicate occur not often, efficiency is a big problem. Thanks anyway. Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Off

Re: [SQL] Foreign key constraint

2000-12-12 Thread Jie Liang
Recovery try use: pg_dump -t tbname -f outfile dbname use vi erase f key from outfile, drop old table, reload them. Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

[SQL] Plpgsql

2000-12-12 Thread feblec
consultas=# CREATE FUNCTION spread(text) consultas-# RETURNS text consultas-# AS 'DECLARE consultas'# str text; consultas'# ret text; consultas'# i integer; consultas'# len integer; consultas'# BEGIN consultas'# str := upper($1); consultas'# r

Re: [SQL] plpgsql

2000-12-12 Thread Mike Castle
On Sat, Dec 09, 2000 at 08:16:06AM +, feblec wrote: > FUNCTION: 'plpgsql'. Recognized languages are sql, C, internal and the > created procedural languages. Look at: postgresql-7.0.3/src/pl/plpgsql/enable_plpgsql mrc -- Mike Castle Life is like a clock: You can work constantl

Re: [SQL] SQL Query using time

2000-12-12 Thread Blaise Carrupt
> Is it possible to carry out the comparison in the following manner > select name from table where 00:12 is between 23:58 and 00:30 You could try something like WHERE ('00:12' BETWEEN startTime AND endTime AND startTime <= endTime) OR ('00:12' NOT BETWEEN endTime AND startTime

[SQL]

2000-12-12 Thread Peeter Smitt
Hi!   Is it somehow possible to join tables from multiple databases in one query?   Thanks   Peeter 

Re: [SQL] plpgsql

2000-12-12 Thread Oliver Elphick
feblec wrote: >consultas=# CREATE FUNCTION spread(text) ... >consultas-# LANGUAGE 'plpgsql'; >ERROR: Unrecognized language specified in a CREATE >FUNCTION: 'plpgsql'. Recognized languages are sql, C, internal and the >created procedural languages. create function plpgsql_call_handle

Re: [SQL] Where Can I find JDBC driver.

2000-12-12 Thread clayton cottingham
Mateusz Mazur wrote: > > Hello. > I wonder where I can find JDBC driver for Postgresql. I think it should be > class (sorry I am newbie). I would be very greatfull for quick response. > > Mateusz. download the source tarball go into src/interfaces/jdbc and follow directions!1 bon appetite!!

[SQL] HELP: can i have a trigger before postgres tries to check data types?

2000-12-12 Thread Bruno Boettcher
hello, now that i finally managed to write some functions and triggers in perl, i get the following error: insert into journal (plus,minus,description,currency,amount) VALUES (101,420,'a test','EUR','1.000.000'); ERROR: pg_atoi: error in "1.000.000": can't parse ".000.000" normal since the

[SQL] lo_import & lo_export

2000-12-12 Thread Junaid Kalim
Hi, I am trying to develop a client application in Visual Basic that will run on MS Windows98 and will communicate via ODBC with a Postgres server on Solaris. I need to store Blob's from the client drive (images) to the Postgres DB. I tried to use lo_import/lo_export but apparently they only work

[SQL] plpgsql

2000-12-12 Thread feblec
consultas=# CREATE FUNCTION spread(text) consultas-# RETURNS text consultas-# AS 'DECLARE consultas'# str text; consultas'# ret text; consultas'# i integer; consultas'# len integer; consultas'# BEGIN consultas'# str := upper($1); consultas'#

[SQL] SQL Query using time

2000-12-12 Thread Karyn Keatley
Hi, I am attempting to write a sql query that compares times on a 24 hr clock eg 09:00<16:30 and 21:00>16:30 09:00 is the start time and 16:30 is the end time. The problem is that if the start time is 23:58 and the end time is 00:30 (next day) is there any way to carry out this comparison withou

[SQL] Fw: lo_import & lo_export

2000-12-12 Thread Junaid Kalim
Hi, I am trying to develop a client application in Visual Basic that will run on MS Windows98 and will communicate via ODBC with a Postgres server on Solaris. I need to store Blob's from the client drive (images) to the Postgres DB. I tried to use lo_import/lo_export but apparently they only

[SQL] Foreign key constraint

2000-12-12 Thread Sivagami .
  Hi,   I have a question. I tried adding a Foreign Key constraint to a table via the ALTER TABLE command. But the records in the table did not match with those in the Parent table. Now my Alter table command, instead of giving me an error of kind - 'records do not match',  has gone into a k

Re: [SQL] how to execute a C program via trigger ?

2000-12-12 Thread Clayton Cottingham
On Mon, 4 Dec 2000 18:20:29 -0800 (PST), S.F. Lee said: > Thank for your hint, but I have some questions : > >1. Do I have to compile the C program into a shared > object (*.so)? yes >2. Do I have to use SPI (SPI is too complicate to > me)? > >My request is very simple. I h

RE: [SQL] SQL parse error

2000-12-12 Thread Kenn Thompson
All- While it is not always the case, I see many responses to questions in the form of "Why don't you just upgrade- that's supported in version XXX". Let me give you several reasons why this is not always possible. 1. Support software is not compatible. I use Chili!soft for Linux, a webpag

RE: [SQL] SQL parse error

2000-12-12 Thread Borek Lupoměský
On Tue, 12 Dec 2000, Francis Solomon wrote: FS> What version of PostgreSQL are you using? This works fine for me on FS> 7.02. Time to update, maybe? Does not seem to be the case... ld01ad02:~$ rpm -q postgresql postgresql-7.0.2-2 Bye Borek -- ==

RE: [SQL] SQL parse error

2000-12-12 Thread Francis Solomon
Hi Borek, What version of PostgreSQL are you using? This works fine for me on 7.02. Time to update, maybe? Hope this helps Francis > >Hello all, > >My following problem is: > > swports=# select substring(cp from 1 for 4)::int4 from out2cp; > ERROR: pg_atoi: error in "6.1,": can't pars

[SQL] SQL parse error

2000-12-12 Thread Borek Lupoměský
Hello all, My following problem is: swports=# select substring(cp from 1 for 4)::int4 from out2cp; ERROR: pg_atoi: error in "6.1,": can't parse ".1," SQL syntax is apparently OK. When I omit the typecast, the query works: swports=# select substring(cp from 1 for 4) from out2cp; subs

Re: [SQL] Where Can I find JDBC driver.

2000-12-12 Thread Peter T Mount
Quoting Mateusz Mazur <[EMAIL PROTECTED]>: > Hello. > I wonder where I can find JDBC driver for Postgresql. I think it should > be > class (sorry I am newbie). I would be very greatfull for quick > response. The JDBC driver is actually a collection of many classes. What you want is the jar arch