Comments (5)
Agree. With your proposal, "this" is going to be private to the function?
Original comment by [email protected]
on 18 Mar 2012 at 7:44
from plv8.
I implemented the code to support separate context. In turn, my code is for
per function, not per user. The feature is experimental and need to set guc
plv8.use_separate_context to on (default to off,) as the performance overhead
is sometimes too big.
Original comment by [email protected]
on 5 Apr 2012 at 10:22
- Changed state: Fixed
from plv8.
I don't think this is the way to go, for several reasons.
First, it's unlike what is done in other languages, and I think orthogonality
would be good.
Second, it should not be controlled by a GUC. This is a security issue, and we
should not have a mode where information can leak across roles changes. What we
should have is a hash of contexts keyed by role id, and switch to the correct
context for the current role, if necessary creating it first. That will also
have the side effect that globally saved data per role will simply be visible
as one would expect.
My proposed startup functionality would be run in each context as it's created
- in the vast majority of cases that would only be once per backend.
I was intending to work on this, and can undertake it if the design above is
agreed.
Original comment by [email protected]
on 18 Apr 2012 at 4:37
from plv8.
The current GUC is for only trial purpose, and I don't intend to expose it as a
normal option. I agree my approach was wrong and should do it your way.
However, I have another idea around it with the global namespace issue and
yield function implementation, so you can of course work on it but I'd like to
see your patch before commit. Possibly my idea is unrelated topic here, but
still I'm interested.
Original comment by [email protected]
on 19 Apr 2012 at 8:22
- Changed state: Accepted
from plv8.
I think this is done.
Original comment by [email protected]
on 27 Apr 2012 at 12:56
- Changed state: Fixed
from plv8.
Related Issues (20)
- Excited to Start working with 3.2alpha Branch HOT 2
- Invalid Discord link? HOT 2
- r3.2 Rocks HOT 2
- Many warnings when building v3.2.0 HOT 2
- /usr/bin/ld: cannot find -lv8_base_with_compiler: No such file or directory HOT 4
- Support for pg16 HOT 4
- plv8_info() causes segmentation fault HOT 2
- Unable to access transition tables declared in trigger HOT 1
- add functions setTimeout and setInterval HOT 11
- Async function call in trigger HOT 4
- Use of Promise HOT 2
- PGXN Build Fails
- undefined symbol: _ZTIN2v84base6ThreadE HOT 11
- Getting Error '-fexcess-precision=standard' is not supported when trying to compile PLV8 with EDB16 HOT 1
- Can't get access to things defined using start_proc HOT 9
- Build guide mistakes HOT 4
- How to use OUT params in plv8 stored proc HOT 1
- terminated with signal SIGTRAP v8::base::OS::Abort() HOT 4
- Versioned SO file creates inconviniences without any benefits
- Repeated version number on docs
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 plv8.