Hi all, sory if this is kind of [OT], but cannot find the answer for
this behaviour
Im programming a db function using plpython...i have a db called
'sessions', and a postgres 8.1.2 database called 'test'. In 'sessions',
i store several values in a `pickled' way so
If a do
"""
You are now connected to database "sessions".
sessions=# select * from getsessiondata( 'QQtEpLoKHnvbKG SpgJgYMPyCdHgXS i');
getsessiondata
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(dp0--ENTER--S---alucod-----ENTER--p1--ENTER--S---32009436-----ENTER--p2--ENTER--sS---respuestas_1-----ENTER--p3--ENTER--S---3-----ENTER--p4--ENTER--sS---respuestas_2-----ENTER--p5--ENTER--S---2-----ENTER--p6--ENTER--sS---respuestas_3-----ENTER--p7--ENTER--S---4-----ENTER--p8--ENTER--sS---submit-----ENTER--p9--ENTER--S---Responder-----ENTER--p10--ENTER--s.
(1 row)
"""
Perfect. Thats what i spect to see.
Now, if i do (in 'test' database)
"""
data = plpy.execute("S ELECT * from dblink('dbname= sessions', 'select * from getsessiondata( \'\'%s\'\')') as t1(session_data name); " % session_id)[0]["session_da ta"];
plpy.notice(dat a)
"""
i got this
NOTICE: ("'(dp0--ENTER--S---alucod-----ENTER--p1--ENTER--S---32009436-----'",)
The pickled string as been truncated at some point, and when i try to unpickle it, i got error.
Now, the question:
What da hell can i do?
-Postgresql 8.1.2
-Python 2.4.2
Im not even sure if this is a pickle, plpython nor postgresql issue, so
im sory if this is [OT] here.
Thanks!!
Gerardo 1 1941
On 2006-08-17, Gerardo Herzig <gh*****@fmed.u ba.arwrote:
Hi all, sory if this is kind of [OT], but cannot find the answer for
this behaviour
Might try on a postgres mailing list. I'd say it is more
on topic there...
You are now connected to database "sessions".
sessions=# select * from getsessiondata( 'QQtEpLoKHnvbKG SpgJgYMPyCdHgXS i');
getsessiondata
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(dp0--ENTER--S---alucod-----ENTER--p1--ENTER--S---32009436-----ENTER--p2--ENTER--sS---respuestas_1-----ENTER--p3--ENTER--S---3-----ENTER--p4--ENTER--sS---respuestas_2-----ENTER--p5--ENTER--S---2-----ENTER--p6--ENTER--sS---respuestas_3-----ENTER--p7--ENTER--S---4-----ENTER--p8--ENTER--sS---submit-----ENTER--p9--ENTER--S---Responder-----ENTER--p10--ENTER--s.
data = plpy.execute("S ELECT * from dblink('dbname= sessions', 'select * from getsessiondata( \'\'%s\'\')') as t1(session_data name); " % session_id)[0]["session_da ta"];
plpy.notice(dat a)
"""
i got this
NOTICE: ("'(dp0--ENTER--S---alucod-----ENTER--p1--ENTER--S---32009436-----'",)
Can you try just...
SELECT * from dblink('dbname= sessions', 'select * from
getsessiondata( 'QQtEpLoKHnvbKG SpgJgYMPyCdHgXS i');
Im not even sure if this is a pickle, plpython nor postgresql issue
or a dblink issue? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michael Hohn |
last post by:
Hi,
under python 2.2, the pickle/unpickle sequence incorrectly restores
a larger data structure I have.
Under Python 2.3, these structures now give an explicit exception from
Pickle.memoize():
assert id(obj) not in self.memo
I'm shrinking the offending data structure down to find the problem
|
by: Mage |
last post by:
Hello!
create or replace function trigger_keywords_maintain() returns trigger as $$
return 'MODIFY'
$$ language plpythonu;
update table set id = id where id = 7;
ERROR: invalid input syntax for type timestamp: "2005-05-03
14:07:33,279213"
|
by: Josué Maldonado |
last post by:
Hello list,
First of all excuse me if this question is so obvius, I have not found
the info I need on this.
I installed pg 7.4.1 from source, now I need to add plpython lang,
should I have to make a full reinstall and recompile with plpython
switch or is there a another way to "add" the lang to the current pg
installation.
|
by: Clodoaldo Pinto Neto |
last post by:
Hi all,
I'm restoring a database from 7.3.4 FC1 to 7.4.2 FC2:
$ pg_restore -d KakaoStats KakaoStats.dump
pg_restore:
could not execute query: ERROR: could not access file
"$libdir/plpython": No such file or directory
The dump was generated with the command:
|
by: Jerry LeVan |
last post by:
Have any configure experts looked at building plpython.so
on mac os x lately?
The standard configure key "--with-python" fails miserably
(libpython is not a shared lib error message).
I found help on the macosxguru site,
Basically one has to change the python_libspec
to (in Makefile.global)
| |
by: Sim Zacks |
last post by:
I have the following function and I am getting an invalid syntax error
when I try to run it. I have tried the function a number of ways
including with named parameters and non-named parameters using the
args array. I also tried it with a tab at the beginning and without.
I've also tried with the $$ and with single quotes and the double
single...
|
by: RL |
last post by:
Hi,
I am trying to implement a few functions in Plpython (in Postgresql 8.0.1).
However, I could find the solution in the documentation, so I would appreciate
your help. My question is how to return a record and sets of records in Plpython
if it's possible. For instance, if we have a table name EMP
CREATE TABLE EMP ( name text, salary...
|
by: Gerardo Herzig |
last post by:
Hi all. Im having a hard time trying to compile the plpython package.
This is the error make gives me:
gherzig@vdb:/usr/local/src/postgresql-8.2.5/src/pl/plpythonmake
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fpic
-shared -Wl,-soname,libplpython.so.0 ...
|
by: IceMan85 |
last post by:
Hi to all, I have spent the whole morning trying, with no success to pickle an object that I have created.
The error that I get is : Can't pickle 'SRE_Match' object: <_sre.SRE_Match object at 0x2a969c0ad0>
the complete stack is the following :
Traceback (most recent call last):
File "manager.py", line 305, in ?
commandLineExec...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |