pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: problems with sqlsetpos -->having odbc intercept alter command
2+ messages / 2 participants
[nested] [flat]
* Re: problems with sqlsetpos -->having odbc intercept alter command
@ 2003-04-09 16:02 Hollysugar Webmaster <webmaster@hollysugar.com>
0 siblings, 0 replies; 2+ messages in thread
From: Hollysugar Webmaster @ 2003-04-09 16:02 UTC (permalink / raw)
To: Dave Page <dpage@vale-housing.co.uk>; +Cc: pgsql-odbc
MessageDave,
For the moment we have given up on syncing the SyWare product with PostgreSql. We are now shifting our focus to using Microsoft's active sync as a method of syncing to the PostgreSql database. Either of these methods will allow us to communicate and sync with the GIS application we have running on the PDA.
With the active sync connection we are also running into a problem. Active sync is sending the command " Alter table "MSysCeCmobile2" add "ConflictID" integer IDENTITY" which then results in a parse error. I have written the equivalent alter table/column commands setting the column to a serial but I do not know how to intercept the original alter command with my group of commands?
I tried to create a function which I was going to invoke with a rule but setting the default value for the sequence caused an error in the function 'ERROR: Attribute "conflict_id_id" not found'. conflict_id_id is the name of the sequence I created. This is the line of code I used:
' ALTER TABLE "MSysCeCmobile2" ALTER "ConflictID" SET DEFAULT nextval("conflict_id_id");'
When I used single quotes within the nextval function I would get a parse error.
Even if I were to get this function to work correctly it does not appear that PostgreSql has support for a rule on ALTER. Which leads me back to intercepting the ALTER command with the ODBC driver and replacing it with my own ALTER commands.
I'm sorry to be such a bother, but hopefully once we get this worked out, it will be useful to other people who would like to sync a mobile application with PostgreSql.
Julie
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: problems with sqlsetpos -->having odbc intercept alter command
@ 2003-04-09 16:25 Dave Page <dpage@vale-housing.co.uk>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Page @ 2003-04-09 16:25 UTC (permalink / raw)
To: Hollysugar Webmaster <webmaster@hollysugar.com>; +Cc: pgsql-odbc
-----Original Message-----
From: Hollysugar Webmaster [mailto:webmaster@hollysugar.com]
Sent: 09 April 2003 17:02
To: Dave Page
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] problems with sqlsetpos -->having odbc
intercept alter command
Dave,
For the moment we have given up on syncing the SyWare product
with PostgreSql. We are now shifting our focus to using Microsoft's
active sync as a method of syncing to the PostgreSql database. Either of
these methods will allow us to communicate and sync with the GIS
application we have running on the PDA.
With the active sync connection we are also running into a
problem. Active sync is sending the command " Alter table
"MSysCeCmobile2" add "ConflictID" integer IDENTITY" which then results
in a parse error. I have written the equivalent alter table/column
commands setting the column to a serial but I do not know how to
intercept the original alter command with my group of commands?
If that's what Activesync sends, then I don't see how you can intercept
it short of hacking the driver or the PostgreSQL parser.
I tried to create a function which I was going to invoke with a
rule but setting the default value for the sequence caused an error in
the function 'ERROR: Attribute "conflict_id_id" not found'.
conflict_id_id is the name of the sequence I created. This is the line
of code I used:
' ALTER TABLE "MSysCeCmobile2" ALTER "ConflictID" SET DEFAULT
nextval("conflict_id_id");'
When I used single quotes within the nextval function I would
get a parse error.
Try doing it in pgAdmin with SQL logging turned on and see what it does.
It's almost certainly single quotes though.
Even if I were to get this function to work correctly it does
not appear that PostgreSql has support for a rule on ALTER. Which leads
me back to intercepting the ALTER command with the ODBC driver and
replacing it with my own ALTER commands.
No, there is no support for rules on ALTER that I'm aware of. If I get
time tomorrow I'll look at activesync (no promises). We have about 20
pocket PCs in the field running a PostgreSQL based application. The only
difference here is that the data is downloaded and prepared in a local
Access database which is then transferred to the ppc.
Regards, Dave.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-04-09 16:25 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-09 16:02 Re: problems with sqlsetpos -->having odbc intercept alter command Hollysugar Webmaster <webmaster@hollysugar.com>
2003-04-09 16:25 Re: problems with sqlsetpos -->having odbc intercept alter command Dave Page <dpage@vale-housing.co.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox