Re: [GENERAL] ERROR: invalid input syntax for integer: "INSERT"

2017-11-04 Thread David G. Johnston
On Saturday, November 4, 2017, Robert Lakes wrote: > > Here's the error I am receiving - when I am attempting to insert a record > into a table: > > ERROR: invalid input syntax for integer: "INSERT" > LINE 1: ...T INTO listings_cdc SELECT statement_timestamp(), 'INSERT', ... > > The second colum

[GENERAL] ERROR: invalid input syntax for integer: "INSERT"

2017-11-04 Thread Robert Lakes
Guys, New to Postgres - here's my code inside an event trigger: ELSIF (TG_OP = 'INSERT') THEN EXECUTE format('INSERT INTO %I SELECT statement_timestamp(), ''INSERT'', $1.*', TG_TABLE_NAME || '_cdc') USING NEW; RETURN NEW; Here's the error I am receiving - when I am attempt

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-07 Thread Adrian Klaver
On 02/06/2013 11:50 PM, Ben Madin wrote: Thank you to all for your help on this problem. I've summarised the resolution in the hope that it might help someone else. With all the advice I have gone forward and discovered that the issue related to a postcode anomaly. A client had provided a new

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-06 Thread Ben Madin
Thank you to all for your help on this problem. I've summarised the resolution in the hope that it might help someone else. With all the advice I have gone forward and discovered that the issue related to a postcode anomaly. A client had provided a new postbox postcode (the application normally

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-06 Thread Tom Lane
Ben Madin writes: > On 2013-02-06, at 13:42 , Tom Lane wrote: >> The only part of this query that looks like it could possibly produce >> that error is the res8.resultvalue-to-int cast: >>> LEFT JOIN results res8 ON res8.reportid = rep.id AND res8.resulttypeid = >>> 108 AND res8.del = false >>>

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-06 Thread Adrian Klaver
On 02/06/2013 01:28 AM, Ben Madin wrote: Thanks Tom, On 2013-02-06, at 13:42 , Tom Lane wrote: The only part of this query that looks like it could possibly produce that error is the res8.resultvalue-to-int cast: LEFT JOIN results res8 ON res8.reportid = rep.id AND res8.resulttypeid = 108

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-06 Thread Ben Madin
Thanks Tom, On 2013-02-06, at 13:42 , Tom Lane wrote: > The only part of this query that looks like it could possibly produce > that error is the res8.resultvalue-to-int cast: >> LEFT JOIN results res8 ON res8.reportid = rep.id AND res8.resulttypeid = 108 >> AND res8.del = false >> LEFT JOIN r

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Ben Madin
Adrian, On 2013-02-06, at 13:33 , Adrian Klaver wrote: > Dim bulb moment. > > What happens if you run a simplified version of the query? > > One that just LEFT JOINS reports to results ON reportid=rep.id. A fair question - it only makes it more confusing : {{{ SELECT rep.id, res8.reportid F

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Tom Lane
Ben Madin writes: > I hope to be shown to be an idiot, but we are receiving the message > ERROR: invalid input syntax for integer: "" The only part of this query that looks like it could possibly produce that error is the res8.resultvalue-to-int cast: > SELECT rep.id, res8.reportid, > round(s

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Adrian Klaver
On 02/05/2013 09:01 PM, Ben Madin wrote: Thanks Adrian, On 2013-02-06, at 12:52 , Adrian Klaver wrote: On 02/05/2013 08:24 PM, Ben Madin wrote: The full query is : {{{ SELECT rep.id, res8.reportid, round(st_distance_sphere('010120BB108716D9CEF7A36240643BDF4F8DA741C0', post.the_poi

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Adrian Klaver
On 02/05/2013 09:01 PM, Ben Madin wrote: Thanks Adrian, On 2013-02-06, at 12:52 , Adrian Klaver wrote: On 02/05/2013 08:24 PM, Ben Madin wrote: The full query is : {{{ SELECT rep.id, res8.reportid, round(st_distance_sphere('010120BB108716D9CEF7A36240643BDF4F8DA741C0', post.the_poi

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Ben Madin
Thanks Adrian, On 2013-02-06, at 12:52 , Adrian Klaver wrote: > On 02/05/2013 08:24 PM, Ben Madin wrote: >> The full query is : >> >> {{{ >> SELECT rep.id, res8.reportid, >> round(st_distance_sphere('010120BB108716D9CEF7A36240643BDF4F8DA741C0', >> post.the_point::geometry)/1000) as di

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Adrian Klaver
On 02/05/2013 08:52 PM, Ben Madin wrote: Thanks Adrian, On 2013-02-06, at 12:40 , Adrian Klaver wrote: I am not seeing anything obvious. Is there a chance the import to the second machine did not go well? Actually, these queries work on the machine that the import was done to - but not the

Re: [GENERAL] ERROR: invalid input syntax for integer: "" - more confusion

2013-02-05 Thread Ben Madin
G'day Adrian, On 2013-02-06, at 12:44 , Adrian Klaver wrote: > This one I could see if the split_part yielded an empty string. You are right on this one - the higher level components don't have a split part 2. Thank you. > > What type is locationcode and could you provide an example? Varch

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Adrian Klaver
On 02/05/2013 08:24 PM, Ben Madin wrote: G'day, I hope to be shown to be an idiot, but we are receiving the message ERROR: invalid input syntax for integer: "" when using a pl/pgsl function with some quite complex queries that seem to be working on a developer machine using postgresql 9.1.6,

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Ben Madin
Thanks Adrian, On 2013-02-06, at 12:40 , Adrian Klaver wrote: > I am not seeing anything obvious. > Is there a chance the import to the second machine did not go well? Actually, these queries work on the machine that the import was done to - but not the original. However, not all is well on th

Re: [GENERAL] ERROR: invalid input syntax for integer: "" - more confusion

2013-02-05 Thread Adrian Klaver
On 02/05/2013 08:38 PM, Ben Madin wrote: G'day again, inconceivably, on a completely different issue, I've run into the above error again - this time on both machines, one running 9.1.6, and the other running 9.1.7. This time, I have a table with locations, some states (level = 1) and some s

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Adrian Klaver
On 02/05/2013 08:24 PM, Ben Madin wrote: G'day, I hope to be shown to be an idiot, but we are receiving the message ERROR: invalid input syntax for integer: "" when using a pl/pgsl function with some quite complex queries that seem to be working on a developer machine using postgresql 9.1.6,

[GENERAL] ERROR: invalid input syntax for integer: "" - more confusion

2013-02-05 Thread Ben Madin
G'day again, inconceivably, on a completely different issue, I've run into the above error again - this time on both machines, one running 9.1.6, and the other running 9.1.7. This time, I have a table with locations, some states (level = 1) and some shires (level = 2). level is defined as an i

[GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Ben Madin
G'day, I hope to be shown to be an idiot, but we are receiving the message ERROR: invalid input syntax for integer: "" when using a pl/pgsl function with some quite complex queries that seem to be working on a developer machine using postgresql 9.1.6, but not on the production machine using

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2009-09-25 Thread Tom Lane
Rakotomandimby Mihamina writes: > I get invalid input syntax when UPDATEing my radacct table: It's the ELSE '' here: >AcctSessionTime = CASE WHEN '' = '' THEN (EXTRACT(EPOCH FROM > ('2009-09-25 10:35:44'::TIMESTAMP WITH TIME ZONE - AcctStartTime::TIMESTAMP > WITH TIME ZONE - '0'::INTER

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2009-09-25 Thread A. Kretschmer
In response to Rakotomandimby Mihamina : > Hi all, > I get invalid input syntax when UPDATEing my radacct table: > > freedsl=# \d radacct > Table "public.radacct" > Column| Type | > Mo

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2009-09-25 Thread Rakotomandimby Mihamina
09/25/2009 01:55 PM, Grzegorz Jaśkiewicz: and what's the error message ? ERROR: invalid input syntax for integer: "" (I put it in the email subject, not very clever from me) -- Architecte Informatique chez Blueline/Gulfsat: Administration Systeme, Recherche & Developpement

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2009-09-25 Thread Grzegorz Jaśkiewicz
On Fri, Sep 25, 2009 at 11:49 AM, Rakotomandimby Mihamina < miham...@gulfsat.mg> wrote: > > I cannot find the problem > Any hints? > and what's the error message ? -- GJ

[GENERAL] ERROR: invalid input syntax for integer: ""

2009-09-25 Thread Rakotomandimby Mihamina
Hi all, I get invalid input syntax when UPDATEing my radacct table: freedsl=# \d radacct Table "public.radacct" Column| Type | Modifiers --+--+