Re: [SQL] sql error creating function

2006-08-11 Thread Christopher Browne
Quoth [EMAIL PROTECTED] ("TJ O'Donnell"): > When I psql -f f.sql > I get the following error: > psql:f.sql:10: ERROR: relation "fragset" does not exist > CONTEXT: SQL function "fragments" > >> cat f.sql > Create Or Replace Function fragments(character varying) > Returns setof character varying >

[SQL] sql error creating function

2006-08-10 Thread TJ O'Donnell
When I psql -f f.sql I get the following error: psql:f.sql:10: ERROR: relation "fragset" does not exist CONTEXT: SQL function "fragments" > cat f.sql Create Or Replace Function fragments(character varying) Returns setof character varying As $$ Create Temporary Table fragset (smiles character

Re: [SQL] Sql - Error : Relation tmp_datos already exists

2005-10-24 Thread tobbe
PgAdmin probably encloses all querys in transactions. Do you? If not, try execute "BEGIN" and "COMMIT" just before and after your query.. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[SQL] Sql - Error : Relation tmp_datos already exists

2005-10-20 Thread Adriana Marcela Aguirre
Hello! Mario Splivalo:Thank you very much for your helpl!!!   I´m working with postgres 7.4.1.  and VFoxPro 5. I call a function (Postgresql) many times from VFoxPro: sql = "select * from f_rep_datos_lab( 'USUARIO')"aaa=sqlexec(db_cone,sql, "report")   This function use temporary tables wich are cr

[SQL] Sql - Error en ejecución de función Post gres desde cliente VFoxPro

2005-10-19 Thread Adriana Marcela Aguirre
Hola a todos!!   Muchas gracias a Mario Splivalo por responder mi mail anterior!!! Tengo otro problema. Yo ejecuto una función en Postgresql desde una aplicación realizada en VFoxPro. La función crea una tabla temporal con la sintaxis CREATE TEMPORAY TABLE tmp_datos (...) ON COMMIT DROP;  Si ejecu

Re: [SQL] SQL error: function round(double precision, integer) does

2005-02-28 Thread Tom Lane
"TJ O'Donnell" <[EMAIL PROTECTED]> writes: > Is there some fundamental reason for round(dp) but round(numeric,int)? I think the main argument against supporting round(dp,int) is that the result would be inherently inexact (at least for int>0). regards, tom lane --

Re: [despammed] [SQL] SQL error: function round(double precision, integer) does not exist

2005-02-28 Thread Andreas Kretschmer
am 27.02.2005, um 15:26:07 -0800 mailte TJ O'Donnell folgendes: > I received the following error when executing a SQL statement: > > SQL error: > ERROR: function round(double precision, integer) does not exist > > In statement: > > select id,smiles,smarts,parameter,oe_count_matches(smiles,smar

Re: [SQL] SQL error: function round(double precision, integer) does

2005-02-28 Thread Richard Huxton
TJ O'Donnell wrote: I received the following error when executing a SQL statement: SQL error: ERROR: function round(double precision, integer) does not exist In statement: select id,smiles,smarts,parameter,oe_count_matches(smiles,smarts) as count, round((parameter*oe_count_matches(smiles,smarts))

Re: [SQL] SQL error: function round(double precision, integer) does not exist

2005-02-28 Thread Josh Berkus
TJ, > SQL error: > ERROR: function round(double precision, integer) does not exist > http://www.postgresql.org/docs/7.4/static/functions-math.html > show that round(numeric,int) should work ok. > If I use round() without a second argument, it works OK, but > this gives a loss of precision which

Re: [SQL] SQL error: function round(double precision, integer) does not exist

2005-02-28 Thread Din Adrian
the round sintax is round(numeric,int) not round (double,int) you must cast the value into numeric: ex: round (cast(doublecolumn as numeric),2) should work ok Adrian Din, Om Computer & SoftWare On Sun, 27 Feb 2005 15:26:07 -0800, TJ O'Donnell <[EMAIL PROTECTED]> wrote: I received the following err

Re: [SQL] SQL error: function round(double precision, integer) does

2005-02-28 Thread TJ O'Donnell
I got round(numeric,int) working OK, but it's got me thinking (a dangerous thing!). Is there some fundamental reason for round(dp) but round(numeric,int)? Shouldn't they be, at least, consistent, having round(numeric) or round(dp,int)? Am I missing something? Thanks, TJ Michael Fuhr wrote: On Sun,

Re: [SQL] SQL error: function round(double precision, integer) does not

2005-02-28 Thread Christoph Haller
TJ O'Donnell wrote: > > I received the following error when executing a SQL statement: > > SQL error: > ERROR: function round(double precision, integer) does not exist > > In statement: > > select id,smiles,smarts,parameter,oe_count_matches(smiles,smarts) as count, > round((parameter*oe_coun

Re: [SQL] SQL error: function round(double precision, integer) does

2005-02-28 Thread TJ O'Donnell
Thanks everyone. Your tips about casting my arg to round() as ::numeric worked just fine. I guess I was surprised that plpgsql didn't that on it's own! I'm used to too many forgiving c compilers, and such. TJ Christoph Haller wrote: TJ O'Donnell wrote: I received the following error when executi

Re: [SQL] SQL error: function round(double precision, integer) does not exist

2005-02-28 Thread Michael Fuhr
On Sun, Feb 27, 2005 at 03:26:07PM -0800, TJ O'Donnell wrote: > ERROR: function round(double precision, integer) does not exist [snip] > The functions described at: > http://www.postgresql.org/docs/7.4/static/functions-math.html > show that round(numeric

[SQL] SQL error: function round(double precision, integer) does not exist

2005-02-28 Thread TJ O'Donnell
I received the following error when executing a SQL statement: SQL error: ERROR: function round(double precision, integer) does not exist In statement: select id,smiles,smarts,parameter,oe_count_matches(smiles,smarts) as count, round((parameter*oe_count_matches(smiles,smarts)),2) as psa,tpsa(smil

Re: [SQL] SQL Error

2002-10-10 Thread Achilleus Mantzios
select t0_o.scheduler_action_id from scheduler_action t0_o where t0_o.is_done = 0 and t0_o.invocation_date <= 1034033214921::numeric; seems to work in PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96 The reason that this query worked in hpux without the explicit casting is maybe hp

Re: [SQL] SQL Error

2002-10-10 Thread Christoph Haller
> CREATE TABLE "scheduler_action" ( >"scheduler_action_id" numeric(30) NOT NULL, >"action_type" numeric(4) NOT NULL, >"priority" numeric(4) NOT NULL, >"referenced_id"numeric(30) NOT NULL, >"invocation_date" numeric(30) NOT NULL, >"is_done"

[SQL] SQL Error

2002-10-07 Thread Rafal Kedziorski
Hallo, I have following table: CREATE TABLE "scheduler_action" ( "scheduler_action_id" numeric(30) NOT NULL, "action_type" numeric(4) NOT NULL, "priority" numeric(4) NOT NULL, "referenced_id"numeric(30) NOT NULL, "invocation_date" numeric(30) NOT

Re: [SQL] Sql error

2001-04-12 Thread Tom Lane
"comp" <[EMAIL PROTECTED]> writes: > but after connection when I type testdb=3D>\df it gives this error: > " ERROR: Function 'oid8types(oidvector)' does not exist. Use the version of psql that came with 7.0.3, not some older version. regards, tom lane --

[SQL] Sql error

2001-04-07 Thread comp
Respected Sir/Madam,   I visit your site find a lot of information. I download postgres7.0.3 latest version and install it on Redhat6.1 server. I follow all the steps in your Install file.   I create a database by  createdb  testdb  command. After that I connect it by  'psql testdb'  comman