Closed johnmudd closed 9 years ago
+1
Any guidance about debugging stuff like this is really, really welcome.
I have a couple of tips at the bottom of my Hue lightbulb FDW readme.md: https://github.com/rotten/hue-multicorn-postgresql-fdw
I also have a couple of tips in the PPT that went with the presentation for that FDW.
It makes sense to roll a bunch of debug tips into a document. If I have a good week at work this week, I'll send a pull request with a /debugging/readme.md file to get it started.
My first suggestion to address that error for update/insert was to make sure you have rowid set:
############
# We need to overload this function so Updates will work
@property
def rowid_column(self):
return self._row_id_column
I see you got that one already. Hmm.
Do you also set it in init? --
# We need to identify the "primary key" column so we can do updates:
self._row_id_column = 'light_id'
You gave me the answer. I had not added the @property decorator to my rowid_column() method. Now it works. Thanks!
On Mon, Aug 24, 2015 at 6:27 AM, Rick Otten notifications@github.com wrote:
I have a couple of tips at the bottom of my Hue lightbulb FDW readme.md: https://github.com/rotten/hue-multicorn-postgresql-fdw
I also have a couple of tips in the PPT that went with the presentation for that FDW.
It makes sense to roll a bunch of debug tips into a document. If I have a good week at work this week, I'll send a pull request with a /debugging/ readme.md file to get it started.
My first suggestion to address that error for update/insert was to make sure you have rowid set:
############
We need to overload this function so Updates will work
@property def rowid_column(self): return self._row_id_column
I see you got that one already. Hmm.
Do you also set it in init? --
We need to identify the "primary key" column so we can do updates:
self._row_id_column = 'light_id'
— Reply to this email directly or view it on GitHub https://github.com/Kozea/Multicorn/issues/110#issuecomment-134136190.
I'm trying to use the write API. I started by trying to execute an
INSERT
. Got the following.ERROR: Error in python: NotImplementedError
I see that I need the
rowid_column()
method. So I added that. And setself.row_id_column
in the__init__()
method. And added stubs forinsert, update, delete, commit, rollback and pre_commit
. Each of these call a log function. None appear to get called though. All I get now is the following.How do I debug this?
John