Thread: postgres sql 7.1.1

postgres sql 7.1.1

From
Timothy.Oliver@worldspan.com
Date:
I'm running into problems with a function on the development Postgres
database server.  This function works fine on the production database
server, but returns an error when executed using PGAdmin or within code.  I
can't say that we've ever attempted to run this function in our
development/preproduction environments before, since we haven't needed to
troubleshoot the "PNRParser" code this much before.

When I try to run the following statement:
      select
create_new_airline_itinerary(693666,'DL','1111','Y','ATL','MCI','2003-04-27
15:54:00','2003-04-27 19:54:00','HK1','NW','2222','Y')

I get the error message:
      Error: ERROR:  parser: parse error at or near "$9" (State:HY000,
Native Code: 7)


I though the error might be related to the minor difference between the
function on the production and development Postgres servers (the 7 and 8
parameters are declared as "timestamptz" on development and preprod but
just "timestamp" on the production database server).  I created a new
function "create_n_itin" that looks exactly the same as the function on
production, but the same error occurs when I execute this function.

Any ideas why this Postgres function is failing?  I don't know what it
thinks is wrong with the 9th parameter!




Tim Oliver
Senior Database Analyst
Worldspan
300 Galleria Parkway, NW
Mail Stop N11A5
Atlanta, Georgia 30339
(770)563-2508
timothy.oliver@worldspan.com

Re: postgres sql 7.1.1

From
Tom Lane
Date:
Timothy.Oliver@worldspan.com writes:
>       select
> create_new_airline_itinerary(693666,'DL','1111','Y','ATL','MCI','2003-04-27
> 15:54:00','2003-04-27 19:54:00','HK1','NW','2222','Y')

>       Error: ERROR:  parser: parse error at or near "$9" (State:HY000,
> Native Code: 7)

I don't know what those "state" and "native code" notations are, but
I'll bet you have some middleware layer in there that is changing the
query in a way you're not aware of.

You might try turning on query logging in Postgres so you can see
exactly what's being sent to the server.

            regards, tom lane