Re: [web2py] Re: PostgreSQL log flooded with "could not receive data from client: Connection reset by peer" messages;

2018-12-07 Thread Tadas U
20 tasks ** .. On Fri, 7 Dec 2018 at 09:50, Tadas U wrote: > Sorry, yes, postgres is 9.3 by the way, forgot to mention > > > On Fri, 7 Dec 2018, 09:46 Massimo Di Pierro wrote: > >> What do you mean by "20 schedulers"? 20 workers? 20 tasks? >> >> On Sunday, 18 November 2018 10:46:35 UTC-8, Tadas

Re: [web2py] Re: PostgreSQL log flooded with "could not receive data from client: Connection reset by peer" messages;

2018-12-06 Thread Tadas U
Sorry, yes, postgres is 9.3 by the way, forgot to mention On Fri, 7 Dec 2018, 09:46 Massimo Di Pierro What do you mean by "20 schedulers"? 20 workers? 20 tasks? > > On Sunday, 18 November 2018 10:46:35 UTC-8, Tadas U wrote: >> >> Web2py version: Version 2.14.6-stable+timestamp.2016.05.10.00.21.4

[web2py] Re: PostgreSQL log flooded with "could not receive data from client: Connection reset by peer" messages;

2018-12-06 Thread Massimo Di Pierro
What do you mean by "20 schedulers"? 20 workers? 20 tasks? On Sunday, 18 November 2018 10:46:35 UTC-8, Tadas U wrote: > > Web2py version: Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 > > AFAIK, the scheduler is responsible, e.x.: > > SETUP (e.x.): > > scheduler.queue_task( > 'test__

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Anthony
On Thursday, March 1, 2018 at 6:36:40 PM UTC-5, Rob Paire wrote: > > I am running the windows binary that is why PostgreSQL was working out of > the box. > > The Windows binary distribution works out of the box with SQLite, MSSQL, > Postgresql and MySQL. > Now I see the Windows binary does incl

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Anthony
Have you restarted the web2py server since updating psycopg2? Do you only have one Python installation on the system? On Thursday, March 1, 2018 at 5:35:59 PM UTC-5, Rob Paire wrote: > > Anthony, > This is surprising information, the server is brand new and all software > is freshly installed.

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Rob Paire
I am running the windows binary that is why PostgreSQL was working out of the box. The Windows binary distribution works out of the box with SQLite, MSSQL, Postgresql and MySQL. The Mac binary distribution works out of the box with SQLite. To use any other database back-end, run from the source

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Rob Paire
Anthony, This is surprising information, the server is brand new and all software is freshly installed. I will research further. Thank you for your help. -Rob On Thursday, March 1, 2018 at 4:40:19 PM UTC-5, Anthony wrote: > > On Thursday, March 1, 2018 at 3:58:52 PM UTC-5, Rob Paire wrote: >>

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Anthony
On Thursday, March 1, 2018 at 3:58:52 PM UTC-5, Rob Paire wrote: > > Hi Anthony, > Yes web2py PG driver works fine, except it is too old, doesn't support > Postgres v10.2 > web2py does not ship with the psycopg2 driver, so if your driver is out of date, it is up to you to update your system. If

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Rob Paire
Hi Anthony, Yes web2py PG driver works fine, except it is too old, doesn't support Postgres v10.2 -Rob On Mar 1, 2018 3:53 PM, "Anthony" wrote: > Looks like it's finding the psycopg2 driver just fine -- the problem is > that it is not finding a database named booster_i. You might need to > speci

[web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Anthony
Looks like it's finding the psycopg2 driver just fine -- the problem is that it is not finding a database named booster_i. You might need to specify the port in the connection string (e.g., "localhost:5432"). Anthony On Thursday, March 1, 2018 at 3:32:14 PM UTC-5, Rob Paire wrote: > > Hi Richar

[web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Rob Paire
Hi Richard, Thank you for your helpful reply. I am running the latest version of web2py 2_16_1. In order to query the version of psycpg2 which web2py is running put the following code into a view: {{import psycopg2}} {{=psycopg2.__version__}} This show web2py is running version 2.5.4 (dt dec p

[web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Anthony
If you have a local installation of Python, it is generally better to run web2py from source, as it will be able to use whatever Python packages you have installed on your system. Anthony On Thursday, March 1, 2018 at 2:39:18 PM UTC-5, Rob Paire wrote: > > Hello web2py community! > > I am in th

[web2py] Re: PostGreSQL views

2016-10-12 Thread Nico de Groot
Nice! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To

[web2py] Re: PostGreSQL views

2016-10-12 Thread Val K
Hi! I use PG views quite often. Common problem is related to permissions: don't forget to grant privilege to web2py login role for select/reference from/to your handmade views. To define view I use db.base_table.field.clone() - undocumented function For example: #definition base table define_ta

[web2py] Re: PostgreSQL

2015-10-28 Thread Val K
Postgresql can be fully portable and runing from flash (including PgAdminIII). All you need - write batch-file in few rows. It's fantastic, I love it! On Wednesday, October 21, 2015 at 4:30:28 PM UTC+3, Massimo Di Pierro wrote: > > > https://www.compose.io/articles/what-postgresql-has-over-o

Re: [web2py] Re: PostgreSQL

2015-10-22 Thread Michele Comitini
Couldn't agree more. Well engineered from the ground up. Been using it for 20+ years, I saw it steadily improving by giving little attention to the fuzz of the moment. I must admit that I become so spoiled, that if something new and really useful appears on the scene of DBs I wait postgres to impl

Re: [web2py] Re: PostgreSQL

2015-10-21 Thread Johann Spies
Also look at this: http://www.dbta.com/Editorial/Trends-and-Applications/Best-Database-Overall%C2%AD-105362.aspx Regards Johann -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

Re: [web2py] Re: PostgreSQL

2015-10-21 Thread Richard Vézina
Thanks for sharing! Richard On Wed, Oct 21, 2015 at 10:07 AM, Leonel Câmara wrote: > It's the only database I use in production. I see no reason to use > anything else really. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2p

[web2py] Re: PostgreSQL

2015-10-21 Thread Leonel Câmara
It's the only database I use in production. I see no reason to use anything else really. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received thi

Re: [web2py] Re: postgresql json getitem function implementation

2015-08-06 Thread Manuele Pesenti
Il 06/08/15 08:11, Massimo Di Pierro ha scritto: > Let's bring this up on web2py developers. I will support it. Can you > submit a patch to pydal? Hi Massimo! Thanks for your replay... I'm glad to contribute... Here you can find my pull request in order it can be properly discussed https://github.

OT pulling request on github (was Re: [web2py] Re: postgresql json getitem function implementation)

2015-08-06 Thread Manuele
Hi! It seams my pull request did not pass one check... https://codecov.io/github/web2py/pydal/commit/009bf14b12079738b81a7a9bd8f970792c4fad09 but I don't understand what's the meaning of this... how can I better adjust my code in order to pass the check? Thanks a lot Manuele Il giorno giov

Re: [web2py] Re: postgresql json getitem function implementation

2015-08-06 Thread Manuele Pesenti
Il 06/08/15 08:11, Massimo Di Pierro ha scritto: > Let's bring this up on web2py developers. I will support it. Can you > submit a patch to pydal? Hi Massimo! Thanks for your replay... I'm glad to contribute... Here you can find my pull request in order it can be properly discussed https://github.

[web2py] Re: postgresql json getitem function implementation

2015-08-05 Thread Massimo Di Pierro
Let's bring this up on web2py developers. I will support it. Can you submit a patch to pydal? On Wednesday, 5 August 2015 17:15:54 UTC-5, Manuele wrote: > > Hi! > I have a table with a json field and I woul like to perform something > like: > > db(db.mytable.id>0).select(db.mytable.myjsonfield

Re: [web2py] Re: PostgreSQL - Sort with NULLS FIRST

2015-06-23 Thread Michele Comitini
you can try building the query with DAL like the following: sql = db(db.t1)._select(orderby=[db.t1.f1]) db.executesql(sql + ' NULLS FIRST') 2015-06-22 10:43 GMT+02:00 pysab : > ok, thanks. Raw SQL is my friend then ;) > > > > On Wednesday, 17 June 2015 09:18:38 UTC+2, Niphlod wrote: >> >> nope

[web2py] Re: PostgreSQL - Sort with NULLS FIRST

2015-06-23 Thread pysab
ok, thanks. Raw SQL is my friend then ;) On Wednesday, 17 June 2015 09:18:38 UTC+2, Niphlod wrote: > > nope. > > On Wednesday, June 17, 2015 at 8:57:45 AM UTC+2, pysab wrote: >> >> Hi there :) >> >> I'm using web2py 2.9.10 with a database PostgreSQL 9.4 for a new project >> and I have a question

[web2py] Re: PostgreSQL - Sort with NULLS FIRST

2015-06-17 Thread Niphlod
nope. On Wednesday, June 17, 2015 at 8:57:45 AM UTC+2, pysab wrote: > > Hi there :) > > I'm using web2py 2.9.10 with a database PostgreSQL 9.4 for a new project > and I have a question about sorting. In PostgreSQL, when I execute a > SELECT, I can specify 'ORDER BY x ASC NULLS FIRST', which is n

[web2py] Re: PostgreSQL connection hangs on insert

2015-05-27 Thread Bilal Hasan
Thing is, when I check any processes with open connections, the database connection is idle. Even if I stop the server, the connection process is still there until I kill the process manually. Not sure where it's hanging. I'm using other databases on the same machine with PostgreSQL which have

[web2py] Re: PostgreSQL connection hangs on insert

2015-05-20 Thread Niphlod
okay, okay, psycopg2 is slightly less buggy than pg8000 but "attempted to connect" is not something driver related. Your instance is completely going offline for a long period of time. On Wednesday, May 20, 2015 at 8:04:10 AM UTC+2, Auden RovelleQuartz wrote: > > have you tried using the p

[web2py] Re: PostgreSQL connection hangs on insert

2015-05-19 Thread Auden RovelleQuartz
have you tried using the psycopg2 driver? On Wednesday, May 20, 2015 at 12:38:51 AM UTC-5, Bilal Hasan wrote: > > I'm having a very annoying issue where the connection to a PostgreSQL > database hangs and I get a "Attempted to connect to this database 5 times > unsuccessfully" which renders th

[web2py] Re: Postgresql problems with 2 tabs

2015-05-07 Thread Niphlod
try to use different formname= argument for each page. On Thursday, May 7, 2015 at 12:14:38 PM UTC+2, Gael Princivalle wrote: > > Hello all. > > I've moved a db from sqlite to postgresql, but I've got a strange problem. > With only one tab, ok. > If I have two tabs with the same application, it se

[web2py] Re: postgresql error ... (relation "auth_user" already exists)

2015-01-11 Thread James McGlynn
I realize this thread is 5 years old, but it still came up when searching for help with the error above and I just wanted to add my struggles. I was getting the following error when deploying to Heroku: relation "web2py_session_3muses" already exists and it was because I had "applications/*/data

Re: [web2py] Re: Postgresql case sensitive field

2014-12-10 Thread Michele Comitini
The text is wrong and the example is right. USE THE EXAMPLE! db = DAL('postgres://...', ...,ignore_field_case=False, entity_quoting=True) 2014-12-09 15:57 GMT+01:00 Paolo Valleri : > try to set ignore_field_case and entity_quoting to True., see > http://web2py.com/books/default/chapter/29/0

[web2py] Re: Postgresql case sensitive field

2014-12-09 Thread Paolo Valleri
try to set ignore_field_case and entity_quoting to True., see http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Database-quoting-and-case-settings--entity_quoting--ignore_field- Paolo On Tuesday, December 9, 2014 2:58:05 PM UTC+1, Leonardo Silvano wrote: > > > I have

[web2py] Re: PostgreSQL migrate / fake_migrate_all failure with relation does not exists

2014-12-01 Thread Tom Øyvind Hogstad
Using the wiki as an example was a bit stupid. This happens to all my tables with a foreign key. The tables exist, but it happens when i add a field. As I understand fake_migrate it regenerates the meta data in databases. So if I first fake_migrate on the database that is exactly the same as my

[web2py] Re: PostgreSQL migrate / fake_migrate_all failure with relation does not exists

2014-12-01 Thread Paolo Valleri
Hi Tom, wiki's tables are not present. You have to include them during the migration, probably you have defined the wiki object in a controller? Paolo On Saturday, November 29, 2014 6:22:00 PM UTC+1, Tom Øyvind Hogstad wrote: > > My migrations suddenly failed with > Error: > ('ERROR', '42P01',

Re: [web2py] Re: postgreSQL: restoring pg_dump using executesql

2014-10-08 Thread Manuele Pesenti
Il 08/10/14 19:29, Cliff Kachinske ha scritto: > Do this instead: > > psql -U - h localhost -d < > your_dumpfile.sql > > psql will ask you for a password. Use your web2py user's password. > > Create the database first, but don't create any tables or anything else. It's not for a "una tantum" rest

[web2py] Re: postgreSQL: restoring pg_dump using executesql

2014-10-08 Thread Cliff Kachinske
Do this instead: psql -U - h localhost -d < your_dumpfile.sql psql will ask you for a password. Use your web2py user's password. Create the database first, but don't create any tables or anything else. On Wednesday, October 8, 2014 12:18:50 PM UTC-4, Manuele wrote: > > Hi! > Is there a way

[web2py] Re: Postgresql and timestamp

2013-09-18 Thread CC J
It works with datetime On Wednesday, September 18, 2013 11:33:50 AM UTC+10, Nate wrote: > > Hi > I've looked through the forum and can find nothing. > my code > db.define_table('franchise', > Field('code', 'string', length=1), > Field('name'), > Field('recorddate','timestamp with time zone')

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-11 Thread Cliff Kachinske
Your source table defines id as an integer. Your target table defines id as a string with length 8. Therefore it will not auto increment. Suggest you look at the manual for your target database to see how to do an auto increment integer for primary key. On Monday, June 10, 2013 11:55:32 AM

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-10 Thread lesssugar
Good to know, thanks. W dniu poniedziałek, 10 czerwca 2013 17:35:04 UTC+2 użytkownik Niphlod napisał: > > sorry to interrupt your monologue but, BTW, web2py's table definition has > no notion of compound unique indexes, so the only way to enforce them (if > you need those) is to alter the table

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-10 Thread Niphlod
sorry to interrupt your monologue but, BTW, web2py's table definition has no notion of compound unique indexes, so the only way to enforce them (if you need those) is to alter the table manually (as you did). Il giorno lunedì 10 giugno 2013 14:51:05 UTC+2, lesssugar ha scritto: > > OK, found a w

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-10 Thread lesssugar
OK, found a way around. I executed the following commands in postgres and the CSV file imported correctly: ALTER TABLE city DROP CONSTRAINT city_country_key; ALTER TABLE city ADD CONSTRAINT city_country_key UNIQUE (name, country,region ); Cheers. On Monday, June 10, 2013 1:36:47 PM UTC+2, lesss

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-10 Thread lesssugar
Further with my monolog... Seems I need to implement this im my table definition: UNIQUE KEY `country` USING BTREE (`country`,`name`,`region`) How do I do it in web2py? On Monday, June 10, 2013 1:24:20 PM UTC+2, lesssugar wrote: > > Yeah, the question is: how 'country' can be a UNIQUE KEY if c

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-10 Thread lesssugar
Yeah, the question is: how 'country' can be a UNIQUE KEY if countries have hundreds of cities. In the table, hundreds of cities will have the belong to the same country, so the no wonder the contry code (which is two letters) will not be unique. I'm confused. On Monday, June 10, 2013 12:59:26 P

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-10 Thread lesssugar
OK, I'm starting to think it's a wrongly defined table. The table I would like to import has following structure: CREATE TABLE `cities` ( `ID` int(8) unsigned NOT NULL auto_increment, `country` char(2) NOT NULL, `region` char(3) NOT NULL, `url` varchar(50) NOT NULL, `name` varchar(50) N

[web2py] Re: Postgresql and unix_sock

2012-09-13 Thread Liam
Great :) Just what I was looking for. Thanks. Others will have to comment if they've encountered this, but it seems pretty rare. I did a lot of digging, but couldn't find other examples. On Thursday, September 13, 2012 1:47:53 PM UTC+2, Massimo Di Pierro wrote: > > You can do it without changing

[web2py] Re: Postgresql and unix_sock

2012-09-13 Thread Massimo Di Pierro
You can do it without changing the source db = DAL(...,driver_args={'unix_sock':'/tmp/.s.PGSQL.5432'}) How common is this scenario? On Thursday, September 13, 2012 3:55:22 AM UTC-5, Liam wrote: > > Hi all, > > Due to a strange Postgresql setup by my systems admin, I can not specify > the host a

Re: [web2py] Re: Postgresql query using trgm-indexing (fuzzy search option)

2011-12-08 Thread Johann Spies
On 8 December 2011 16:23, Massimo Di Pierro wrote: > What's similarity? It is an indication of the probability of the match. > What database engine supports it > Postgresql. See http://stackoverflow.com/questions/2254999/similarity-function-in-postgres-with-pg-trgm There is also http://www.

[web2py] Re: Postgresql query using trgm-indexing (fuzzy search option)

2011-12-08 Thread Massimo Di Pierro
What's similarity? What database engine supports it? On Dec 8, 4:02 am, Johann Spies wrote: > How would one translate the following query into DAL - or should I use > executesql (I would like to use the query in SQLFORM.grid): > > select B.title, A.title, similarity(A.title, B.title) > from > us2

[web2py] Re: PostgreSQL names case sensitivity

2011-11-28 Thread Alan Etkin
Great!. I didn know of that option. Instead i was switching the string in the function that handles the field sequence in gluon.dal (wich was not a good practice). The cause of the error was that sequence name for PostgreSQL had to be table_table_id_seq and not table_id_seq (for a table with table_

[web2py] Re: PostgreSQL names case sensitivity

2011-11-27 Thread Massimo Di Pierro
In gluon/dal.py there is the following code: def sequence_name(self,table): return '%s_id_Seq' % table is generates the default name of a sequence. if you have a sequence already and it has another name use db.define_table(...,sequence_name = '...') On Nov 28, 12:16 am, Johann Spies wr

[web2py] Re: Postgresql-problem when deleting fields

2011-10-11 Thread Johann Spies
On 11 October 2011 12:31, Johann Spies wrote: > I have changed the model of a populated table (removing two fields with > uuid-type references to other tables). > > Now when I restart web2py the process never becomes ready. In the > Postgresql-log I see: > > 2011-10-11 12:24:13 SAST LOG: could

[web2py] Re: postgresql DAL connection issue

2011-09-27 Thread lucas
oh damn, i just figured it out. Mariano, everything you told me was correct, thank you. i finally remembered that SELinux might be blocking it. so i disabled it temporarily with, echo 0 > /selinux/enforce and then tried to access the "database administration" and it created the tables and wor

[web2py] Re: postgresql DAL connection issue

2011-09-27 Thread lucas
hello Mariano, i have made progress. i was editting the wrong pg_hba.conf and postgresql.conf files. the proper location under centos6.0 was under / var/lib/pgsql/9.1/data. once i editted those conf files there, everything started working better, but not completely. let me summarize: #testing

[web2py] Re: postgresql DAL connection issue

2011-09-26 Thread lucas
hey Mariano, damn thing has me stumped. i first under root: > cp postgresql.conf.sample postgresql.conf > gedit postgresql.conf & where i added the line listen_addresses = '*' > service postgresql-9.1 restart Stopping postgresql-9.1 service: [ OK ] Starting postgresql

Re: [web2py] Re: postgresql DAL connection issue

2011-09-26 Thread Mariano Reingart
Look what your listen address is in postgresql.conf (this is not the problem but just to check for the record): listen_addresses = '*' Put * or 127.0.0.1 or the ip addresses you want to open. Then, restart the server and test with psql command line tool: psql prac2 -U lucas -h 127.0.0.1 It shou

[web2py] Re: postgresql DAL connection issue

2011-09-26 Thread lucas
ok, this is what i did to follow Mariano's suggestions: as root: > service iptables stop // should allow or accept all interfaces and ports > cp /usr/pgsql-9.1/share/pg_hba.conf.sample /usr/pgsql-9.1/share/pg_hba.conf which the previous has the lines in it # IPv4 local connections: hostall

Re: [web2py] Re: Postgresql 9.0 problem.

2011-08-18 Thread Richard Vézina
Your welcome ;-) Richard On Thu, Aug 18, 2011 at 2:25 AM, annet wrote: > Hi Richard, > > I did as you suggested and that solved the problem, thanks. > > > Kind regards, > > Annet. > > > Did you set your pg_hba.conf and postgresql.conf... > > > > These lines at least : > > > > pg_hba.conf : > >

[web2py] Re: Postgresql 9.0 problem.

2011-08-17 Thread annet
Hi Richard, I did as you suggested and that solved the problem, thanks. Kind regards, Annet. > Did you set your pg_hba.conf and postgresql.conf... > > These lines at least : > > pg_hba.conf : > > host    all         all         *127.0.0.1*/24          md5 > > postgresql.conf : > > listen_addre

Re: [web2py] Re: Postgresql 9.0 problem.

2011-08-17 Thread Richard Vézina
Did you set your pg_hba.conf and postgresql.conf... These lines at least : pg_hba.conf : hostall all *127.0.0.1*/24 md5 postgresql.conf : listen_addresses = '***' # Don't remember original value... ssl =* true or false * Richard On Wed, Aug 17, 2011 at 6:40 A

[web2py] Re: Postgresql 9.0 problem.

2011-08-17 Thread annet
@David, > Do you have PostgreSQL python adapter installed? Is the adapter listed in > web2py startup log? Yes I have. @pbreit > It seems to me I tried specifying the port once and it didn't work. Should it? I did work in 8.4. I think for now I just re-install version 8.4, it may not be a web2

[web2py] Re: Postgresql 9.0 problem.

2011-08-17 Thread pbreit
It seems to me I tried specifying the port once and it didn't work. Should it?

[web2py] Re: Postgresql 9.0 problem.

2011-08-17 Thread David Marko
Do you have PostgreSQL python adapter installed? Is the adapter listed in web2py startup log?

[web2py] Re: Postgresql 9.0 problem.

2011-08-17 Thread David Marko
I use following URI: db = DAL('postgres://username:password@localhost/web2py_twister', pool_size=10)

Re: [web2py] Re: postgresql - define tables that reference other tables not yet defined

2011-06-13 Thread Carlos
Thanks for all you input.

Re: [web2py] Re: postgresql - define tables that reference other tables not yet defined

2011-06-13 Thread pbreit
Mariano is probably right that you want to avoid circular references if possible. But the example you provided doesn't look like a circular reference to me. What you might want to do is define the tables first without the reference, have Web2py create them and then add the reference after the t

Re: [web2py] Re: postgresql - define tables that reference other tables not yet defined

2011-06-13 Thread Mariano Reingart
IRRC Workaround are: * redesign the database to avoid circular references * don't use circular references at all, they aren't really required by web2py DAL, you can define tables without "references" feild types, just normal ones, and use validators (you can add foreign key constraints later by

Re: [web2py] Re: postgresql - define tables that reference other tables not yet defined

2011-06-13 Thread Carlos
Hi Mariano, Thanks for your input. I would like a generic and automated web2py solution for circular references that works with all supported dbs (not only postgresql). I thought this was already supported in web2py, which is why I was asking also to Massimo (pending his confirmation / correct

Re: [web2py] Re: postgresql - define tables that reference other tables not yet defined

2011-06-13 Thread Mariano Reingart
On Mon, Jun 13, 2011 at 3:43 PM, Carlos wrote: > Hi Massimo (and others), > Can you please let me know if this is supported by web2py (therefore > considered a bug)?. > Otherwise, do you have any recommendations to solve it?. You can define your tables manually via SQL, and disable web2py migrati

[web2py] Re: postgresql - define tables that reference other tables not yet defined

2011-06-13 Thread Carlos
Hi Massimo (and others), Can you please let me know if this is supported by web2py (therefore considered a bug)?. Otherwise, do you have any recommendations to solve it?. I also posted a message here: https://groups.google.com/d/msg/web2py/G3HABb--lGs/9P9TIC_hIV4J Thanks, Carlos

[web2py] Re: postgresql - define tables that reference other tables not yet defined

2011-06-12 Thread Carlos
Hi villas, Yes, I meant 'reference xtable2', I just forgot to update the pasted code. Massimo (or others), should this be supported by web2py for postgresql?. Thanks, Carlos

[web2py] Re: postgresql - define tables that reference other tables not yet defined

2011-06-12 Thread villas
I guess you meant: reference xtable2 Well the easy way is to make sure your tables are created in the right order, but with circular references that isn't possible. I thought that Massimo had addressed this by turning off the checking for other tables, but maybe it isn't working... https://

[web2py] Re: Postgresql database schema

2011-05-31 Thread Mathew Grabau
You could always do the db.define_table calls specific to the tables that are in the schema: def define_schema1(): db.define_table("table1") # and so forth def define_schema1(): db.define_table("tablea") # and so forth # later on... (after changing the schema) if current_schema

Re: [web2py] Re: Postgresql database schema

2011-05-31 Thread Massimiliano
Sure... That is the way I'm follow... Fortunately I haven't tables with the same name... Ciao On Tue, May 31, 2011 at 3:50 AM, Mathew Grabau wrote: > You could always change the schema before executing the db commands: > > db.executesql("set search_path to 'schemaname,public';") > > If you coul

[web2py] Re: Postgresql database schema

2011-05-30 Thread Mathew Grabau
You could always change the schema before executing the db commands: db.executesql("set search_path to 'schemaname,public';") If you could determine the name of the schema first that would be feasible. On May 30, 5:14 am, Massimiliano wrote: > Hi all, > > I've a legacy enterprise application th

[web2py] Re: PostgreSQL Error "SELECT DISTINCT, ORDER BY expressions must appear in select list"

2011-04-04 Thread Massimo Di Pierro
We need to see the web2py expression that generates the problematic query. From your comment it seems to me the problem is there. On Apr 4, 9:24 am, fuga wrote: > I attach argument-variables that is passed to BaseAdapter.select() (by > using pydev). > > Do you mean as such? > > I'm working for sa

Re: [web2py] Re: PostgreSQL Error "SELECT DISTINCT, ORDER BY expressions must appear in select list"

2011-04-04 Thread fuga
I attach argument-variables that is passed to BaseAdapter.select() (by using pydev). Do you mean as such? I'm working for sahana-eden project. It will be used for the earthquake rescue of Japan. http://eden.sahanafoundation.org/wiki PostgreSQL errors are caused by some querys which succeeds o

[web2py] Re: PostgreSQL Error "SELECT DISTINCT, ORDER BY expressions must appear in select list"

2011-04-04 Thread Ross Peoples
Showing us the model would help too, especially if you are connecting to a legacy database.

[web2py] Re: PostgreSQL Error "SELECT DISTINCT, ORDER BY expressions must appear in select list"

2011-04-03 Thread Massimo Di Pierro
Can you show us the web2py dal expression that caused the invalid query? Thanks! On Apr 3, 8:19 am, fuga wrote: > web2py generate SQL that PostgreSQL doesn't accept. > > For instance, > > SELECT DISTINCT a.id, a.uid, a.name FROM a, b WHERE a.deleted <> > 'T') AND (a.id > 0)) AND (((b.deleted

[web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-24 Thread Carlos
Hi Massimo, Can you please provide your feedback on this?. I just don't want to face these show-stopper problems when my system goes to production mode. Thanks, Carlos

[web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-18 Thread Carlos
Massimo, No, I did not copy the files from 'databases' folder ... should I have done so?. Carlos

[web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-18 Thread Massimo Di Pierro
are you copying the content of databases/ folder? On Feb 18, 10:33 am, Carlos wrote: > Hi, > > I just upgraded to the latest web2py version (1.92.1 source) in my > development local win7 environment with postgresql and migrate=True, and my > original problem occurred once again. > > Traceback (mo

[web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-18 Thread Carlos
Hi, I just upgraded to the latest web2py version (1.92.1 source) in my development local win7 environment with postgresql and migrate=True, and my original problem occurred once again. Traceback (most recent call last): File "C:\web2py\gluon\restricted.py", line 188, in restricted exec cc

[web2py] Re: Postgresql auth_user_id_seq already exist . Urgent!!!

2011-02-13 Thread Massimo Di Pierro
Most of your problems are solved by: http://www.web2py.com/examples/static/nightly/web2py_src.zip Please check it and let us know if you still have a problem. On Feb 13, 1:44 pm, Ovidio Marinho wrote: >             This thread not have with problem related.Also the previous > problem 'and on po

Re: [web2py] Re: Postgresql auth_user_id_seq already exist . Urgent!!!

2011-02-13 Thread Ovidio Marinho
This thread not have with problem related.Also the previous problem 'and on postgres, but I reported the problem' and it says that different auth_user_id_seq already exists and in fact the databases was not created, 'and the creation of the database. So if there is already where this co

[web2py] Re: Postgresql auth_user_id_seq already exist . Urgent!!!

2011-02-13 Thread Massimo Di Pierro
Follow up on other thread: http://groups.google.com/group/web2py/browse_thread/thread/464c7f3ab44fb240# On Feb 13, 9:56 am, Ovidio Marinho wrote: > Personally, I gave up after many tests, I decided to return the installation > of 189.6 andeverything works normally, a problem with the new DAL in

[web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-13 Thread Massimo Di Pierro
this problem has been already fixed in trunk some time ago. Check the nightly build from the download page. Massimo On Feb 13, 8:43 am, Ovidio Marinho wrote: > Here if I create a new db postgres does not create the tables,already in the > database sqlite, normally creates. > > 2011/2/4 Massimo D

Re: [web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-13 Thread Ovidio Marinho
Here if I create a new db postgres does not create the tables,already in the database sqlite, normally creates. 2011/2/4 Massimo Di Pierro > You are using web2py trunk right? Did you set a sequence_name > manually? > > On Feb 4, 7:22 am, Tom Atkins wrote: > > I am getting the same error as repo

Re: [web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-13 Thread Ovidio Marinho
I have the same problem, already found the solution?TRACEBACK 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Traceback (most recent call last): File "c:\web2py\gluon\restricted.py", line 188, in restricted exec ccode in environment File "c:/web2py/applications/dema

Re: [web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-07 Thread Tom Atkins
On 6 February 2011 15:51, Massimo Di Pierro wrote: > The least comment in the issue thread says it is fixed after deleting > the pyc. Is that not correct? > > Yes - fixed after dal.pyc was recreated with new version.

[web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-06 Thread Massimo Di Pierro
The least comment in the issue thread says it is fixed after deleting the pyc. Is that not correct? On Feb 6, 7:26 am, Tom Atkins wrote: > Thanks for looking into this Massimo.  I just pulled the most recent version > and still get the same error as originally described.  I added a comment > here

Re: [web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-06 Thread Tom Atkins
Oops - sorry, ignore my last message. I had an old version of dal.pyc... removed that and restarted web2py and everything is working great. Many thanks. On 6 February 2011 13:26, Tom Atkins wrote: > Thanks for looking into this Massimo. I just pulled the most recent > version and still get the

Re: [web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-06 Thread Ovidio Marinho
here I also have this same problem. I also still have problems with the ID in version 191.6. Ouvir Ler foneticamente Dicionário - Ver dicionário detalhado Traduza qualquer site - Yomuiri Online

Re: [web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-06 Thread Tom Atkins
Thanks for looking into this Massimo. I just pulled the most recent version and still get the same error as originally described. I added a comment here: http://code.google.com/p/web2py/issues/detail?id=173&can=1&sort=-id Let

[web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-04 Thread Massimo Di Pierro
This is a trunk bug. The problem does should be there in stable. I will fix this tonight. On Feb 4, 12:50 pm, Tom Atkins wrote: > On 4 February 2011 14:33, Massimo Di Pierro wrote: > > > You are using web2py trunk right? > > Yes - just a clean version of web2py pulled by Hg from Google code. > >

Re: [web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-04 Thread Tom Atkins
On 4 February 2011 14:33, Massimo Di Pierro wrote: > You are using web2py trunk right? Yes - just a clean version of web2py pulled by Hg from Google code. > Did you set a sequence_name > manually? No (not even sure what sequence_name is!) - I tried another app of my own and get the same res

[web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-04 Thread Massimo Di Pierro
You are using web2py trunk right? Did you set a sequence_name manually? On Feb 4, 7:22 am, Tom Atkins wrote: > I am getting the same error as reported by Carlos and cannot fix it. > > I have just set up a new server (Ubuntu 10.04 - postgres 8.4, Python 2.6.5) > and have web2py trunk up and runnin

Re: [web2py] Re: postgresql error ... (relation "auth_user" already exists)

2010-11-19 Thread Johann Spies
On 18 November 2010 14:03, mdipierro wrote: > This is a reasonable error now. > > when you change a field type (but not the name) web2py tries to > convert the data. In this case postgres fails because it does not know > how to convert dates to integers. > > You have to do it in multiple steps: >

Re: [web2py] Re: PostgreSQL super slowdowns

2010-11-18 Thread Michele Comitini
LIMITing results to max 1, is a good practice when you expect at most 1 result. On postgresql it is very important to create indexes to have huge performance boosts. Check your slow queries with the EXPLAIN command (see on postgresql.org) and make appropriate indexes. Also do cluster long tables

[web2py] Re: PostgreSQL super slowdowns

2010-11-18 Thread Chris
I added your limitby code to some places. I haven't seen the same slowdowns recently, though, so it's hard to tell what happened - maybe it's from a fresh install of postgresql? We'll see if it comes back. On Nov 1, 11:01 pm, KMax wrote: > Please check .first() or .last() usage. > With Postgres f

  1   2   >