Comments (8)
@jottyfan what version of PL/R are you using ?
from plr.
sorry, forgot to mention:
- debian stretch (amd64)
me@local:~$ apt-cache policy postgresql-11-plr
postgresql-11-plr:
Installiert: 1:8.4-1.pgdg90+1
Installationskandidat: 1:8.4-1.pgdg90+1
Versionstabelle:
*** 1:8.4-1.pgdg90+1 500
500 http://apt.postgresql.org/pub/repos/apt stretch-pgdg/main amd64 Packages
100 /var/lib/dpkg/status
and
me@local:~$ apt-cache policy r-base
r-base:
Installiert: 3.3.3-1
Installationskandidat: 3.3.3-1
Versionstabelle:
*** 3.3.3-1 500
500 http://ftp.de.debian.org/debian stretch/main amd64 Packages
100 /var/lib/dpkg/status
from plr.
@jottyfan what is your expectation here ? The code as is does not work, but I'm curious what your use case is ?
from plr.
Thanks for your fix.
My expectation is that I can use a plr-trigger on any postgreSQL-table, even if it contains bytea-columns. Besides, I found out that on tables with text columns, entries with very large content generate the same crash. I don't know exactly what the limit was, but I think about 32k. So my solution was to generate a postgresql trigger function in plr (after insert trigger) that handles the inserted values in any way; now I do this on a replacement table (without bytea) and do a select inside of the trigger by omitting the pg.tg.new record and do a select on the table instead. In the end, this is a upload functionality to parse some big files (xls, ods, csv, ...) to fill some other database tables. Doing so in a trigger function might be a weird use case, but I'm trying to find out what is possible, and currently, it looks very well...
from plr.
Well I don't think my fix is correct, all it does is stop the crash, I don't believe it ends up with anything usable. As for text columns I find that surprising.
As for plr-triggers, I expect it would be much easier to write triggers in plpgsql and then call R from there. It would be much easier to manipulate the row in plpgsql.
Thanks,
Dave
from plr.
Well I don't think my fix is correct, all it does is stop the crash...
But for me this is a bugfix, it stops the crash. :)
As for plr-triggers, I expect it would be much easier to write triggers in plpgsql and then call R from there. It would be much easier to manipulate the row in plpgsql.
Yes, but... have you ever tried to parse an xls file with plpgsql? Doing so in R is easy, it saves me a lot of (dev) time. If I call R from plpgsql (still don't know how to do so), what was a reason to use plr then? I'd better give plr a chance.
from plr.
@jottyfan the semantics of bytea in PL/R is as follows: PL/R assumes that whatever is stored in the bytea object has been serialized by R using 'serialize'. The use case is: If you are pre-processing some data you might want to store it in a bytea object after serializing it. What this means is that unless the bytea data was a serialized R object there is no standard way for R to understand the bytes that have been stored in there. As I said you'd be better off using plpgsql and sanitizing any columns and then passing it to PL/R. You can do another select in plplgsql or in postgresql 11 you can call another procedure.
from plr.
lack of response
from plr.
Related Issues (20)
- Tagging the project no longer releases the tag HOT 9
- Test and Build PL/R on PostgreSQL 14 HOT 4
- Can't ALTER EXTENSION ... UPDATE from 8.4.2 to 8.4.4 HOT 3
- Package libR was not found in the pkg-config search path HOT 4
- Fix the pgcrypto position error in the Windows build that uses pg master HOT 2
- 8_4_5 release is missing from releases section of github HOT 5
- Fix Code Documentation HOT 2
- Could not load library plr.dll HOT 21
- Update appveyor to pg v14 and R v 4.2.0 HOT 6
- Build PL/R on PG15 and R_4.2.1 and 4.1.3 HOT 4
- New R 4.3.0 with Visual Studio on Windows challenges HOT 3
- Build_plr_with_Microsoft_Visual_Studio_2022 HOT 4
- Update versions of PG and R. Support. Introduce the meson build system.
- Update versions of PG and R. Introduce the meson build system. #146
- Pull #149 - Linux Ubuntu Debian PostgreSQL 16 Binaries are Now Available HOT 1
- Getting started in Docker? HOT 1
- ERROR: unknown function type 3 HOT 5
- Fatal error: unable to initialize the JIT HOT 14
- PostgreSQL 17 support HOT 6
- Early August 2024 updated builds 2 - Pull request #159 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plr.