[TinyOWS-users] RES: TinyOWS-users Digest, Vol 14, Issue 6

Marcelo vismari at ig.com.br
Tue Oct 26 10:15:57 EST 2010


Hi Olivier,

I compiled using the new file(wfs_transaction.c at r319) and the command
update does not work yet, but I changed one line of your code  and now
works, take a look at below:

/*retrieve the name of the table in which features must be updated */
    typename = wfs_retrieve_typename(o, wr, n);
    buffer_copy(sql, ows_psql_schema_name(o, typename));

//from:   buffer_add_str(sql, ".\"");
//to:    buffer_add_str(sql, "\".\"");

    buffer_add_str(sql, "\".\"");
    buffer_copy(sql, typename);
    buffer_add_str(sql, "\"");
    n = n->children;

the problem was the command generated by code came like this: "schema.table"
set..... but the correct is "schema"."table" set.....
Making this little change the update operation works fine for every schemas.
Now everything is working fine!

Thank you very much for your help.

Best regards,
Marcelo Vismari


-----Mensagem original-----
De: tinyows-users-bounces at lists.maptools.org
[mailto:tinyows-users-bounces at lists.maptools.org] Em nome de
tinyows-users-request at lists.maptools.org
Enviada em: segunda-feira, 25 de outubro de 2010 15:00
Para: tinyows-users at lists.maptools.org
Assunto: TinyOWS-users Digest, Vol 14, Issue 6

Send TinyOWS-users mailing list submissions to
	tinyows-users at lists.maptools.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.maptools.org/mailman/listinfo/tinyows-users
or, via email, send a message with subject or body 'help' to
	tinyows-users-request at lists.maptools.org

You can reach the person managing the list at
	tinyows-users-owner at lists.maptools.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of TinyOWS-users digest..."


Today's Topics:

   1. Re: InvalidParameterValue (Olivier Courtin)
   2. Re: Tinyows - Postgis Schema support (Olivier Courtin)
   3. RES:  Tinyows - Postgis Schema support (Marcelo)
   4. Re: RES:  Tinyows - Postgis Schema support (Olivier Courtin)


----------------------------------------------------------------------

Message: 1
Date: Mon, 25 Oct 2010 09:17:59 +0200
From: Olivier Courtin <olivier.courtin at gmail.com>
Subject: Re: [TinyOWS-users] InvalidParameterValue
To: TinyOWS users discuss list <tinyows-users at lists.maptools.org>
Message-ID: <D101DF47-74FC-45E6-AD86-E500F800FFE3 at gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes


On Oct 12, 2010, at 1:17 PM, Gissur ??rhallsson wrote:

Hi Gissur,

> If you append outputFormat=JSON (like so) to that request, you'll  
> see that there is no fid returned.
>
> So the problem seems to be that the JSON outputFormat does not  
> generate a fid, making futher transactions using the response invalid.
>
> I'm guessing this is not expected behaviour - should I file a ticket?

Yes go on to create the relevant ticket !

--
Olivier

------------------------------

Message: 2
Date: Mon, 25 Oct 2010 09:21:40 +0200
From: Olivier Courtin <olivier.courtin at gmail.com>
Subject: Re: [TinyOWS-users] Tinyows - Postgis Schema support
To: TinyOWS users discuss list <tinyows-users at lists.maptools.org>,
	Marcelo <vismari at ig.com.br>
Message-ID: <6185EE9E-E633-40BE-9D2A-CB7C633C4CB8 at gmail.com>
Content-Type: text/plain; charset=WINDOWS-1252; format=flowed;
	delsp=yes


On Oct 18, 2010, at 9:53 PM, Marcelo wrote:

Hi Marcelo,

> I am doing some tests with Tinyows and I could not make Updates on  
> Postgres using a table from a different schema than ?public?. I put  
> the schema tag in config.xml and I could display the records on the  
> map but I could not update them. I read the error message from  
> Postgres and I found out that Tinyows didn?t put the schema name  
> before table name, it put just:


Sorry for the delay,

What is the Tinyows version you use ?
Is a SELECT query (GetFeature) work well on the same layer ?

--
Olivier



------------------------------

Message: 3
Date: Mon, 25 Oct 2010 10:35:02 -0200
From: "Marcelo" <vismari at ig.com.br>
Subject: [TinyOWS-users] RES:  Tinyows - Postgis Schema support
To: "'Olivier Courtin'" <olivier.courtin at gmail.com>,	"'TinyOWS users
	discuss list'" <tinyows-users at lists.maptools.org>
Message-ID: <000701cb7441$0ec50400$2c4f0c00$@com.br>
Content-Type: text/plain;	charset="us-ascii"

Hello Olivier,

Thank you for your reply. 
- I'm using 0.9. 
- Yes, the select query works well. Using Openlayers I can see the records
on the map through a WFS layer, but I could not update them. Before getting
this error everything was working fine, I could make select, update and
delete commands without problems, but when I moved the table from public
schema to other schema the update command stopped working. I though strange
because I put the schema name in the configuration file, so looked for more
further information in the Postgres log and I found the command that raised
the error. The error came up because there is no schema name before table
name in the update command, like this:
"Updade myTable set....."

I think you can make a simple test just moving some table from public schema
to other schema and do some transactions like update and delete.

I you need more information please let me know and thank you very much for
your help.

Best regards,
Marcelo Vismari


-----Mensagem original-----
De: Olivier Courtin [mailto:olivier.courtin at gmail.com] 
Enviada em: segunda-feira, 25 de outubro de 2010 05:22
Para: TinyOWS users discuss list; Marcelo
Assunto: Re: [TinyOWS-users] Tinyows - Postgis Schema support


On Oct 18, 2010, at 9:53 PM, Marcelo wrote:

Hi Marcelo,

> I am doing some tests with Tinyows and I could not make Updates on  
> Postgres using a table from a different schema than "public". I put  
> the schema tag in config.xml and I could display the records on the  
> map but I could not update them. I read the error message from  
> Postgres and I found out that Tinyows didn't put the schema name  
> before table name, it put just:


Sorry for the delay,

What is the Tinyows version you use ?
Is a SELECT query (GetFeature) work well on the same layer ?

--
Olivier




------------------------------

Message: 4
Date: Mon, 25 Oct 2010 15:38:25 +0200
From: Olivier Courtin <olivier.courtin at gmail.com>
Subject: Re: [TinyOWS-users] RES:  Tinyows - Postgis Schema support
To: TinyOWS users discuss list <tinyows-users at lists.maptools.org>
Message-ID: <871518DC-0814-4C52-8571-E78390AAF94C at gmail.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes


On Oct 25, 2010, at 2:35 PM, Marcelo wrote:

Hi Marcelo,

> Thank you for your reply.
> - I'm using 0.9.

> The error came up because there is no schema name before table
> name in the update command, like this:
> "Updade myTable set....."

Ok thanks for this detailled report !
I've just looked at the code, and commit a fix (r319)

Is it possible for you to retrieve latest trunk version and check  
again ?

Thanks !

--
Olivier


------------------------------

_______________________________________________
TinyOWS-users mailing list
TinyOWS-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tinyows-users


End of TinyOWS-users Digest, Vol 14, Issue 6
********************************************



More information about the TinyOWS-users mailing list