Re: Multiline plpython procedure - Mailing list pgsql-general

From Greg Stark
Subject Re: Multiline plpython procedure
Date
Msg-id 877jm7b97b.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Multiline plpython procedure  (Marco Colombo <marco@esi.it>)
Responses Re: Multiline plpython procedure
Re: Multiline plpython procedure
List pgsql-general
Marco Colombo <marco@esi.it> writes:

> Exaclty. Or, one could say: the "standard" text format is the one the
> platform you are running on dictates. Which is what python does.

Egads. So the set of valid Python programs is different depending on what
platform you're on? That's just, uhm, insane. So essentially Python isn't a
single language, it's a set of languages, Python-NL, Python-NLCR, Python-CR,
(and in theory others).

So if I generate a database with a Python-CRNL function on windows, then
pg_dump it and load it on Unix the function won't run because it's the wrong
language, Unix only supports Python-NL.

I don't think it's reasonable for pg_dump to think about converting data from
one language to another. It's important for pg_dump to restore an identical
database. Having it start with special case data conversation from one flavour
to another seems too dangerous.


Incidentally, are we sure we've diagnosed this correctly? I'm discussing this
with some Python developers and they're expressing skepticism. One just tried
a quick test with a Python program containing a mixture of all three newline
flavours and it ran fine.


--
greg

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Calculating a moving average
Next
From: "Jason C. Wells"
Date:
Subject: Re: Best Linux Distribution