pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
HELP! ... pg_locale ???
2+ messages / 2 participants
[nested] [flat]

* HELP! ... pg_locale ???
@ 2000-10-26 14:48 Sandis Jerics <sandis@mediaparks.lv>
  2000-10-27 05:33 ` Re: HELP! ... pg_locale ??? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Sandis Jerics @ 2000-10-26 14:48 UTC (permalink / raw)
  To: pgsql-sql

Hello folks,

I got a headache now, cause our admin played with postgres settings,
something about pg_locale, as he says. Perhaps the reason is
elsewhere, i dont know.

As result, now all queries, written inside the php code on multiply lines,
returns the following:

 ERROR: parser: parse error at or near " "
 
The same query, pasted to psql, works well.
The same query written on single line in php code works well.
But i see that my older scripts with multiply line queries works well.

Whats up?! Why?

There is no errors in this code:
------
$result = @pg_exec($db,"
 SET DATESTYLE = 'ISO';
 SELECT DISTINCT
   meznieciba,
   date_part('day',date(datums))   AS dd,
   date_part('month',date(datums)) AS mm,
   date_part('year',date(datums))  AS yyyy,
   galvene,
   kajene
   FROM izsoles
 WHERE datums = '$datums'") or die(pg_errormessage());
------
it works fine when written on the single line
but now i see the above stupid error message..

it so funny to have to rewrite queries to single line?..

--:)-- 
Best regards,
 Sandis





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: HELP! ... pg_locale ???
  2000-10-26 14:48 HELP! ... pg_locale ??? Sandis Jerics <sandis@mediaparks.lv>
@ 2000-10-27 05:33 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2000-10-27 05:33 UTC (permalink / raw)
  To: Sandis Jerics <sandis@mediaparks.lv>; +Cc: pgsql-sql

Sandis Jerics <sandis@mediaparks.lv> writes:
> As result, now all queries, written inside the php code on multiply lines,
> returns the following:
>  ERROR: parser: parse error at or near " "

At a guess, you're having trouble with newline representations
(Unix convention is \n only, DOS/Windows convention is \r\n,
and then there's Macintosh which likes \r only).

We've been working to change Postgres to accept all of these
choices, but depending on which version of which tool you are
using, you may need to toe the Unix line faithfully.  The above
message looks a lot like something spitting up on a stray \r.

Dunno what your admin did to make the problem appear where you
hadn't had it before...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-10-27 05:33 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-26 14:48 HELP! ... pg_locale ??? Sandis Jerics <sandis@mediaparks.lv>
2000-10-27 05:33 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox