Re: PostgreSQL Django Query

2021-01-07 Thread gabriela...@gmail.com
Sachin: I don't understand the reason you bring 2 million records. Why you don't do that witht REACT? So there is not recharge the browser every time request data from server. El jueves, 7 de enero de 2021 a las 11:13:23 UTC-3, sachin...@gmail.com escribió: > I am using Python Django and Postg

Re: Postgresql and mysql

2020-05-23 Thread Sebastian Jung
Hey you can Import Files on a Terminal with sudo -u postgres psql < File.txt Salima Begum schrieb am Mo., 18. Mai 2020, 13:50: > Hi , > Mysql query which we used previously now we moved to postgresql, > Here is the below query in mysql , Can anyone help me to write > similar query in postgresql.

Re: Postgresql and mysql

2020-05-23 Thread Ram
Hello Salima, You could use the COPY command that is documented here. https://www.postgresql.org/docs/current/static/sql-copy.html But if the data is bulk and that data has to be copied or inserted into the table in a faster manner, your ideal solution is *Pgloader *because of its performance be

Re: PostgreSQL data transfering

2020-03-11 Thread Naveen Arora
Please be more specific about your question. As far i could understand by now, you need to check how your models are related and then you can easily normalize them into as many models as possible. Cheers On Wednesday, 11 March 2020 15:29:32 UTC+5:30, Eldar Yerzhanov wrote: > > Hello, I have th

Re: PostgreSQL get_object_or_404 matching query does not exist when indeed it does?

2017-02-18 Thread Nikoleta Misheva
I missed that it is message.user.username when pasting it here but anyway it does not work. I checked it's class and it is str събота, 18 февруари 2017 г., 21:47:27 UTC+2, Daniel Roseman написа: > > On Saturday, 18 February 2017 17:37:49 UTC, Nikoleta Misheva wrote: >> >> I am querying PostgreSQL

Re: PostgreSQL get_object_or_404 matching query does not exist when indeed it does?

2017-02-18 Thread Daniel Roseman
On Saturday, 18 February 2017 17:37:49 UTC, Nikoleta Misheva wrote: > > I am querying PostgreSQL using *get_object_or_404 * but it throws and > exception *PairUsers matching query does not exist *and after that *During > handling of the above exception, another exception > occurred:django.h

Re: Postgresql Triggers and Django

2014-12-04 Thread Carl Meyer
Hi Philip, On 12/04/2014 02:28 PM, Philip Haynes wrote: > Hi, > I have tracked back through the messages in this group and examined the > documentation for version 1.7 of Django and I have a question. > > The 1.7 documentation > (https://docs.djangoproject.com/en/1.7/howto/initial-data/) > des

Re: Postgresql Triggers and Django

2014-12-04 Thread Andreas Kuhne
Hi Philip, I ran into this problem earlier today actually. The problem is that you can't provide initial data for populating the models (or tables). That's what this refers to. To provide initial data, you have to run a migration. The initial-data information is only for loading the database with

Re: PostgreSQL, queries, speed

2014-06-19 Thread Vladimir Chukharev
On Tuesday, June 17, 2014 3:42:56 AM UTC+3, Lachlan Musicman wrote: > > The db is hosted on the same server, it's not underpowered, and it is > less poorly tuned so much as untuned. > > Untuned is the same as poorly tuned when it comes to PostgreSQL. Or worse. Pg has defaults from last millenniu

Re: PostgreSQL, queries, speed

2014-06-17 Thread Tom Evans
On Tue, Jun 17, 2014 at 11:14 PM, Tom Evans wrote: > You want a multi column index when you want to speed up queries > involving all the columns in that query. Or, depending on database features, queries involving all the columns[0:N] - eg an index on (first_name, last_name, sex) would still opti

Re: PostgreSQL, queries, speed

2014-06-17 Thread Tom Evans
On Tue, Jun 17, 2014 at 10:26 PM, Lachlan Musicman wrote: > tkc, > > Is that the default created when adding db_index=True of is that > something that I would do directly in postgres itself? > > cheers > L. Yep, although obviously that won't work when you want a multi-column index. You want a mul

Re: PostgreSQL, queries, speed

2014-06-17 Thread Lachlan Musicman
tkc, Is that the default created when adding db_index=True of is that something that I would do directly in postgres itself? cheers L. On 17 June 2014 22:50, Tim Chase wrote: > On 2014-06-17 11:04, Russell Keith-Magee wrote: >> On Tue, Jun 17, 2014 at 9:25 AM, Lachlan Musicman wrote: >> > Now r

Re: PostgreSQL, queries, speed

2014-06-17 Thread Tim Chase
On 2014-06-17 11:04, Russell Keith-Magee wrote: > On Tue, Jun 17, 2014 at 9:25 AM, Lachlan Musicman wrote: > > Now reading about indexes I can't believe I've not used them > > previously. > > Indicies are definitely your friend - *especially* on > PostgreSQL. :-) I've found http://use-the-index-l

Re: PostgreSQL, queries, speed

2014-06-17 Thread Lachlan Musicman
I discovered what was going wrong - I was configuring pg9.3 but my db was in pg9.1 I think that's a hangover from when I updated from 12.04 to 14.04 or something. Anyway, thankful for backups! (redface) On 17 June 2014 16:50, Alex Mandel wrote: > If you stick to stock python commands virtualenv s

Re: PostgreSQL, queries, speed

2014-06-16 Thread Alex Mandel
If you stick to stock python commands virtualenv shouldn't be involved at all and you can just point to the system python. Thanks, Alex On 06/16/2014 08:16 PM, Lachlan Musicman wrote: > Thanks Russ, appreciated. > > Out of interest, how do people use plpythonu in postgres when virtualenv'd? > >

Re: PostgreSQL, queries, speed

2014-06-16 Thread Lachlan Musicman
Thanks Russ, appreciated. Out of interest, how do people use plpythonu in postgres when virtualenv'd? I'm seeing a lot of "set the PYTHONPATH envvar in Postgres" answers is this the way? What if I have 3 virtualenvs (dev, stage, prod) on the same machine, each grabbing a different DB (dev, stage

Re: PostgreSQL, queries, speed

2014-06-16 Thread Russell Keith-Magee
On Tue, Jun 17, 2014 at 9:25 AM, Lachlan Musicman wrote: > Thank Glen, appreciated. > > Now reading about indexes I can't believe I've not used them previously. > Indicies are definitely your friend - *especially* on PostgreSQL. :-) > Does the addition of "db_index=True" to a field require a m

Re: PostgreSQL, queries, speed

2014-06-16 Thread Lachlan Musicman
Thank Glen, appreciated. Now reading about indexes I can't believe I've not used them previously. Does the addition of "db_index=True" to a field require a migration, or is it acceptable to just add. I guess that it will require a migration, since it's a DB level change. Or an instruction to the

Re: PostgreSQL, queries, speed

2014-06-16 Thread Glen Jungels
You should definitely be able to accomplish what you are needing with a stored function in PostgreSQL. By sending only a single request and letting the database server do the processing for you, you'll minimize how much work the web server has to do. That said, writing a stored function/procedure

Re: PostgreSQL, queries, speed

2014-06-16 Thread Lachlan Musicman
tkc, You make good points, and I will need to look into better use of Django first - aggregates and the like. I have seen the queries sent, and there are plenty. The problem isn't that we are sending 5000 rows - some parts have hundreds of Buckets, each Bucket needs to be tested that it has qty>

Re: PostgreSQL, queries, speed

2014-06-16 Thread Tim Chase
On 2014-06-17 10:08, Lachlan Musicman wrote: > The problem is that even with a relatively small number of parts > (<5000) and only 4 currencies (USD, AUD, EUR, GBP) we are seeing > page rendering slow down as each of those queries is sent off to be > worked out. A couple things occur to me: - hav

Re: PostgreSQL on windows 7 (psycopg2 install problem)

2014-02-12 Thread Maksym Sokolsky
You can install to virtualenv localy like this: "easy_install http://www.stickpeople.com/projects/python/win-psycopg/psycopg2-2.4.win32-pyx.x-pg9.0.3-release.exe"; - thanks to @ig0774 from http://stackoverflow.com/a/5383266 On Sunday, April 14, 2

Re: PostgreSQL OperationalError

2013-10-18 Thread Muhammed TÜFEKYAPAN
I restart and problem solved. Thanks everbody. Best. On Friday, October 18, 2013 11:28:45 AM UTC+3, Muhammed TÜFEKYAPAN wrote: > > Hello, > > > I just start to publish my app on web. Everything going well but I face a > new problem, before I never face. Site working but sometimes raise error >

Re: PostgreSQL OperationalError

2013-10-18 Thread Xavier Ordoquy
If you are using anything other than the devserver, you'll need to reload / restart your service in order for your changes to take effects. Django/webservers differ a couple of things until a request comes. This means that if you changed the settings after a first request you may have a some thr

Re: PostgreSQL OperationalError

2013-10-18 Thread Muhammed TÜFEKYAPAN
Thanks for answer. But if my login and pass didn't match, it always raise error. It just sometimes raise error, sometimes doesn't. 2013/10/18 Xavier Ordoquy > Hello, > > Your DATABASES settings aren't correct. > fe_sendauth is about Postgresql complaining the login/password didn't > match. > >

Re: PostgreSQL OperationalError

2013-10-18 Thread Xavier Ordoquy
Hello, Your DATABASES settings aren't correct. fe_sendauth is about Postgresql complaining the login/password didn't match. Regards, Xavier, Linovia. Le 18 oct. 2013 à 10:28, Muhammed TÜFEKYAPAN a écrit : > Hello, > > > I just start to publish my app on web. Everything going well but I face

Re: postgresql 64 bit in python 32 bit

2013-06-03 Thread Alex Mandel
On 06/03/2013 10:23 AM, Kakar Arunachal Service wrote: Hi, I just uninstalled python 64 bit and reinstalled python 32 bit. So i have postgresql 64 bit in my system. Will it a problem later if i use 32 bit python in 64 bit postresql? Should be fine, Python psycopg2 sends SQL commands to postgre

Re: postgresql

2013-05-20 Thread Anurag Chourasia
Read this for a starter http://www.postgresql.org/docs/9.2/interactive/index.html Regards, Guddu On Mon, May 20, 2013 at 3:35 PM, Kakar Arunachal Service < kakararunachalserv...@gmail.com> wrote: > hi guyz! > I'm new to django and python, and very new to postgresql. Can u suggest > any books or

Re: postgresql

2013-05-20 Thread Charly Román
You don't need a tutorial for Postgresql, django ORM make all the work. BTW, if you need a tutorial you muts ask in a postgresql group. 2013/5/20 Kakar Arunachal Service : > hi guyz! > I'm new to django and python, and very new to postgresql. Can u suggest any > books or tutorial for postgresql?

Re: postgresql

2013-05-20 Thread Itamar Reis Peixoto
On Mon, May 20, 2013 at 4:35 PM, Kakar Arunachal Service wrote: > hi guyz! > I'm new to django and python, and very new to postgresql. Can u suggest any > books or tutorial for postgresql??? try googling for python psycopg -- Itamar Reis Peixoto -- You received this message beca

Re: PostgreSQL on windows 7 (psycopg2 install problem)

2013-04-14 Thread Mustafa Tulu
Thank you! Installing system wide did actually solve the problem. On Sun, Apr 14, 2013 at 8:29 PM, Sanjay Bhangar wrote: > On Windows, I'd strongly recommend just installing the pre-compiled > binaries for these sort've things, unless you're experienced with compiling > software / making this so

Re: PostgreSQL on windows 7 (psycopg2 install problem)

2013-04-14 Thread Avraham Serour
I usually try to compile the packages on my win7 machine, just so I can use pip install inside my virtualenv. psycopg2 was the only one so far that I couldn't, eventually I installed the pre compiled binaries on my root python installation and then copied the files/folder necessary for psycopg2 fro

Re: PostgreSQL on windows 7 (psycopg2 install problem)

2013-04-14 Thread Sanjay Bhangar
On Windows, I'd strongly recommend just installing the pre-compiled binaries for these sort've things, unless you're experienced with compiling software / making this sort've thing work on Windows .. So, install something like http://www.stickpeople.com/projects/python/win-psycopg/ and then, make

Re: PostgreSQL on windows 7 (psycopg2 install problem)

2013-04-14 Thread Serdar Dalgic
On Sun, Apr 14, 2013 at 5:45 PM, Mustafa Tulu wrote: > Hi All, Hi; > > When I try to install the package into my virtualenv in pycharm, it tries to > compile the source into binaries, it fails at linking stage, giving errors > like: > Creating library build\temp.win32-2.7\Release\psycopg\_psyco

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Christophe Pettus
On Oct 20, 2012, at 11:34 PM, Barry Morrison wrote: > Looking further at Postgresql, what's interesting. Is it creates an 'id' > column and appends '_id' to what is assumed to be the id field (if none is > specified). > > Also, it appears the magic may have already created the indexes: It'

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Barry Morrison
Looking further at Postgresql, what's interesting. Is it creates an 'id' column and appends '_id' to what is assumed to be the id field (if none is specified). Also, it appears the magic may have already created the indexes: django_db=# \d press_page Table

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Barry Morrison
Here is what exists in Dev re: Query Plan from debug toolbar: QUERY PLAN Sort (cost=8.28..8.28 rows=1 width=740)Sort Key: pgnumber -> Index Scan using press_page_article_id_like on press_page (cost=0.00..8.27 rows=1 width=740)Index Cond: ((article_id)::text = 'Test'::text) On

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Barry Morrison
prefetch-related is awesome! Thank you for that. Thanks! Barry On Fri, Oct 19, 2012 at 11:54 PM, Xavier Ordoquy wrote: > Hi, > > As Samuel said, the first step is to install Django Debug Toolbar to see > what's going on with your queries. > Then you'll probably be interested in > https://docs.

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Barry Morrison
I am using Django Debug Toolbar locally for development. That is where I copied & pasted the SQL from. Even if I had a complete set of data for postgresql, my local machine is an 8-core, 16GB of RAM, with solid state hard drives. A LOT different than my 2CPU/1GB RAM/spindle disk VPS. I guess wh

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-19 Thread Xavier Ordoquy
Hi, As Samuel said, the first step is to install Django Debug Toolbar to see what's going on with your queries. Then you'll probably be interested in https://docs.djangoproject.com/en/1.4/ref/models/querysets/#prefetch-related Regards, Xavier Ordoquy, Linovia. Le 20 oct. 2012 à 05:16, Barry Mo

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-19 Thread Sam Lai
On 20 October 2012 14:16, Barry Morrison wrote: > I've got a pretty expensive query...Wondering if I can't speed things up in > regards to Postgresql. > > Here is the model: [1] http://dpaste.org/JmEeQ/ > > Here is the sql statement: [2] http://dpaste.org/GbfAJ/ > > Here is the template: [3] http:

Re: postgresql connection is not closed

2012-05-14 Thread akaariai
On May 14, 9:05 am, shariq wrote: > Hi, > I am running django-1.2 with postgresql. > I am facing the problem. > Django is not closing the connection and the connection is > retained by db-server until DBA goes and kill the connection manually. Are you using multiple databases? Is this happening i

Re: PostgreSQL Socket 5432 Error

2012-04-19 Thread Jeff Heard
The other possibility is that you need to build psycopg2 from scratch and set the pg_config option in setup.cfg. I have to do this with the brew build of pg because the socket is elsewhere On Apr 19, 2012, at 7:32 PM, Russell Keith-Magee wrote: > On Friday, 20 April 2012 at 6:04 AM, Zach wr

Re: PostgreSQL Socket 5432 Error

2012-04-19 Thread Russell Keith-Magee
On Friday, 20 April 2012 at 6:04 AM, Zach wrote: > Hi I am trying to setup a PostgreSQL database for Heroku. I am running > into trouble. > > I installed PostgreSQL(9.0) from EnterpriseDB on OS X 10.6. However, > when I do a simple > > $ psql -U postgres > > I get this error message. > > psql:

Re: PostgreSQL Introspection Bug

2012-04-11 Thread akaariai
On Apr 11, 4:39 pm, Thomas Guettler wrote: > I fixed a postgreSQL introspection bug, but unfortunately it is still in > stage "new". > > Can someone please review it? > >    https://code.djangoproject.com/ticket/17785 I hope to find time to look at this. No promises, but added to my rather long

Re: Postgresql transaction error

2011-03-22 Thread cootetom
Thanks for the replies. Looking in the log files got me back on track. There was a SQL query running against the database that would never work due to the table to existing. Now i know where to look next time! On Mar 22, 5:42 pm, Jason Culverhouse wrote: > On Mar 22, 2011, at 10:03 AM, cootetom

Re: Postgresql transaction error

2011-03-22 Thread Simon Riggs
On Tue, Mar 22, 2011 at 5:03 PM, cootetom wrote: > Hi, I've been trying to use Postgresql because I'm thinking of using > that instead of MySQL due to it's ability to role back transactions > making it easier to use South. However I've hit a wall with it and > can't seem to fix it. > > I'm using

Re: Postgresql transaction error

2011-03-22 Thread Jason Culverhouse
On Mar 22, 2011, at 10:03 AM, cootetom wrote: > I'm using the psycopg2 python library and have tried postgresql 8 and > now 9. > > The error, in brief, is: > > " > Template error > In template c:\python26\lib\site-packages\django\contrib\admin > \templates\admin\base.html, error at line 58 > Caug

Re: Postgresql transaction error

2011-03-22 Thread Shawn Milochik
pdb: www.doughellmann.com/PyMOTW/pdb/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

Re: Postgresql transaction error

2011-03-22 Thread Shawn Milochik
The cause is that there's a problem with a line of code that interacts with the database, leaving the database connection dirty and unusable. The error occurs not at that line of code, but at the next line of code which tries to use the database connection. The solution is to use pdb and/or loggi

Re: PostgreSQL 7.4/8.0/8.1 EOL

2010-07-08 Thread Russell Keith-Magee
On Fri, Jul 9, 2010 at 1:56 AM, Joshua D. Drake wrote: > Hello, > > I wanted to let the Django community know that PostgreSQL has stated an > EOL (End of Life) for PostgreSQL versions 7.4, 8.0, and 8.1. > > If you are running any version of PostgreSQL 7.4, 8.0 or 8.1, it is time > to upgrade to 8.

Re: PostgreSQL backend - Ident authentication failed?

2010-06-21 Thread Kenneth Gonsalves
On Monday 21 June 2010 16:21:10 Sam Lai wrote: > >From the PGSQL docs [1], > > "On systems supporting SO_PEERCRED requests for Unix-domain sockets > (currently Linux, FreeBSD, NetBSD, OpenBSD, BSD/OS, and Solaris), > ident authentication can also be applied to local connections. In this > case, no

Re: PostgreSQL backend - Ident authentication failed?

2010-06-21 Thread Sam Lai
On 21 June 2010 20:16, Kenneth Gonsalves wrote: > On Monday 21 June 2010 15:37:50 Sam Lai wrote: >> >> You do bring up a interesting point though, and I don't know much >> >> about the architecture of Apache and how holes are exploited when they >> >> exist, but if the trespasser can execute arbit

Re: PostgreSQL backend - Ident authentication failed?

2010-06-21 Thread Kenneth Gonsalves
On Monday 21 June 2010 15:37:50 Sam Lai wrote: > > and a single point of entry to all systems for a cracker > > I'm not running them all as admin (aka. root) obviously. Integrated > auth doesn't mean every user account can access every resource. It's > really just delegating an application's authe

Re: PostgreSQL backend - Ident authentication failed?

2010-06-21 Thread Sam Lai
On 21 June 2010 19:47, Kenneth Gonsalves wrote: > On Monday 21 June 2010 13:39:42 Sam Lai wrote: >> > should be forbidden - one does not want apache to have direct access to >> > the database >> >> Storing a password in plaintext file makes me uneasy, even though it >> is locked away through file-

Re: PostgreSQL backend - Ident authentication failed?

2010-06-21 Thread Kenneth Gonsalves
On Monday 21 June 2010 13:39:42 Sam Lai wrote: > > should be forbidden - one does not want apache to have direct access to > > the database > > Storing a password in plaintext file makes me uneasy, even though it > is locked away through file-system permissions. > > Having spent some time recentl

Re: PostgreSQL backend - Ident authentication failed?

2010-06-21 Thread Sam Lai
On 21 June 2010 17:04, Kenneth Gonsalves wrote: > On Monday 21 June 2010 12:24:58 Torsten Bronger wrote: >> > Also, is this recommended practice, to use "www-data" as the >> > backend database username? >> >> No, not recommended, but not forbidden either. >> > > should be forbidden - one does not

Re: PostgreSQL backend - Ident authentication failed?

2010-06-21 Thread Kenneth Gonsalves
On Monday 21 June 2010 12:45:11 Victor Hooi wrote: > I'm still curious what changed? Perhaps Ubuntu's default pg_hba.conf > default always has ident in all distros that I am aware of -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You received this message because you are s

Re: PostgreSQL backend - Ident authentication failed?

2010-06-21 Thread Victor Hooi
heya, Using "www-data" as the backend database username in settings.py doesn't quite work. If you try to run a ./manage.py syncdb, it spits out: Traceback (most recent call last): File "./manage.py", line 11, in execute_manager(settings) File "/usr/local/lib/python2.6/dis

Re: PostgreSQL backend - Ident authentication failed?

2010-06-21 Thread Kenneth Gonsalves
On Monday 21 June 2010 12:24:58 Torsten Bronger wrote: > > Also, is this recommended practice, to use "www-data" as the > > backend database username? > > No, not recommended, but not forbidden either. > should be forbidden - one does not want apache to have direct access to the database -- Re

Re: PostgreSQL backend - Ident authentication failed?

2010-06-20 Thread Torsten Bronger
Hallöchen! Victor Hooi writes: > [...] > > However, I'm still curious as to what changed, as I'm fairly sure > this setup worked on the old Ubuntu 9.04 server? And I'm > definitely sure that the database username was set to "victorhooi" > on that old system - I copied the settings.py file over us

Re: PostgreSQL backend - Ident authentication failed?

2010-06-20 Thread Kenneth Gonsalves
On Monday 21 June 2010 11:18:27 Victor Hooi wrote: > OperationalError at admin > FATAL: Ident authentication failed for user "victorhooi" > in pg_hba.conf change the authorisation from ident to password -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You received thi

Re: PostgreSQL backend - Ident authentication failed?

2010-06-20 Thread Victor Hooi
heya, Thanks for the tip. It does work now, following your advice =). I created a new PostgreSQL user named "www-data". I then changed my settings.py file: 'USER': 'www-data', # Not used with sqlite3. 'PASSWORD': 'ourpassword', # Not

Re: PostgreSQL backend - Ident authentication failed?

2010-06-20 Thread Torsten Bronger
Hallöchen! Victor Hooi writes: > [...] > > I created a blank PostgreSQL database as myself ("victorhooi"). > > I ran ./manage.py syncdb, and this seemed to authenticate fine, > and create all the required tables. > > When I try to go to http://site.com/admin though, I get an error: > > Operat

Re: postgresql errors (works in sqlite)

2009-11-23 Thread Some Guy
gah, after a few hours of fighting with postgres, I missed that somehow, duh. I thought I had made it an int, sqlite3 was fixing it for me. thanks for the reply. On Nov 23, 10:35 am, Bill Freeman wrote: > counts[i] = Submission.objects.all().filter(status__exact=str(i)).count() > > If you really

Re: postgresql errors (works in sqlite)

2009-11-23 Thread Bill Freeman
counts[i] = Submission.objects.all().filter(status__exact=str(i)).count() If you really intended status to be an integer, you might prefer to alter your table to make the column the right type. The alter table command required is beyond my sql confidence. Older postgresql and lots of other datab

Re: PostgreSQL triggers with Django?

2009-11-16 Thread Daniel Quinn
On Monday 16 November 2009 08:43:35 Alessandro Pasotti wrote: > after banging my head for a few hours, I've found a solution to this > problem with a snippet: > > http://www.djangosnippets.org/snippets/1338/ > > This works for me with the standard SQL syntax (dollar quoting), just put > your cus

Re: PostgreSQL triggers with Django?

2009-11-16 Thread Alessandro Pasotti
2009/11/16 Daniel Quinn > I may be new to triggers, but I think that I've managed to figure out how > to > write one properly with plpgsql and it works even... when I copy/paste the > SQL > into psql client window. > > However, when I put the aforementioned SQL into a .sql file and run syncdb, >

Re: PostgreSQL Schema support

2009-11-15 Thread Melvyn Sopacua
On Sun, 15 Nov 2009 15:20:32 -0800, Christophe Pettus wrote: > On Nov 15, 2009, at 2:35 PM, Melvyn Sopacua wrote: >> Is it possible for a "Django appointments application" to understand >> and use >> the geographical information from the tables in the geo_regionX >> schema and >> equally impor

Re: PostgreSQL Schema support

2009-11-15 Thread Christophe Pettus
On Nov 15, 2009, at 2:35 PM, Melvyn Sopacua wrote: > Is it possible for a "Django appointments application" to understand > and use > the geographical information from the tables in the geo_regionX > schema and > equally important to treat that specific schema as read only, as the > data is

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-09 Thread Jason Beaudoin
> > > @Jason - I think that's the number one reason I'm going to PostgreSQL. I > don't use everything all the time but I really like to have the widest array > of query syntax options. MySQL is just too limiting, especially when > PostgreSQL is available. > > The other issue I have with MySQL is t

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-08 Thread Joshua Russo
On Tue, Sep 8, 2009 at 5:53 AM, Jan Ostrochovsky wrote: > > I won't compare PostgreSQL and MySQL as whole, because: > - I do not know MySQL so well, as PostgreSQL > - another flamewar could arise ;) > > I am only saying: my experience with Django+PostgreSQL is far better, > than Django+MySQL, see

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-07 Thread Jan Ostrochovsky
I won't compare PostgreSQL and MySQL as whole, because: - I do not know MySQL so well, as PostgreSQL - another flamewar could arise ;) I am only saying: my experience with Django+PostgreSQL is far better, than Django+MySQL, see http://groups.google.com/group/django-users/browse_thread/thread/3abf

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-07 Thread Jason Beaudoin
On Fri, Sep 4, 2009 at 4:29 PM, Joshua Russo wrote: > I personally don't have any experience with PostgreSQL and I'm generally > working in a mixed MS and Linux environment. I'm interested to hear peoples > views on the pluses and minuses of the two different systems. I'm a bit of a > query geek

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-07 Thread Joshua Russo
On Mon, Sep 7, 2009 at 2:30 PM, Zberteoc wrote: > > Some consider good practice to actually never expose directly the > tables to the users but do this through stored procedures and views > only. In this way you achieves 2 major things, complete control and > security. Users have no permission to

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-07 Thread Zberteoc
Some consider good practice to actually never expose directly the tables to the users but do this through stored procedures and views only. In this way you achieves 2 major things, complete control and security. Users have no permission to select/update/insert/delete on the tables but they are giv

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-05 Thread Joshua Russo
Thanks, that is a good example. Back to the original point of the post. It looks like I'm going to be doing a lot more work with PgSQL. I see they are working to put replication in the core in the next major subversion (which honestly I rarely need). The real kicker for me is that PgSQL seems to ha

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-05 Thread Siemster
++ Zberteoc for the link to the comparison. w.r.t. using triggers/procedures. If a database is getting updated by multiple applications then using triggers/procedures to move duplicated business rules into the database starts to make some sense-- even more so if you don't have good control over a

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-05 Thread Joshua Russo
Great site! thanks With my SQL experience, your comment about database coding seems to ring true. The database is a much different environment, with different paradigms, than a standard application environment. When you really need database coding you know it (kind of like meta programming). So f

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-05 Thread Zberteoc
This is a common mistake almost all non SQL developers make thinking in procedural/programming language terms in regards wit SQL and database coding. If you're asking me there is nothing cool in the feature of creating stored procedures in other than the SQL language. MS-SQL introduced that with 2

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Joshua Russo
Wow, that's a cool trick to be able to implement stored procedures in different languages. I might actually use them more if I could do everything in the same language as the application. I only looked quickly through the PostgreSQL docs for subqueries. Thanks for the heads up. As far as the Gis f

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Siemster
PostgreSQL does support subqueries in the from clause, however iirc, the subquerys require an alias. If you decide to do geo then the PostGis addon to Postgres is very nice. Another nice capability in PostgreSQL is that you can use different languages for writing your stored procedures (should y

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Joshua Russo
On Fri, Sep 4, 2009 at 11:07 PM, Tim Chase wrote: > > > I personally don't have any experience with PostgreSQL and I'm generally > > working in a mixed MS and Linux environment. I'm interested to hear > peoples > > views on the pluses and minuses of the two different systems. I'm a bit > of a > >

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Joshua Russo
Nice! thanks for that one. On Fri, Sep 4, 2009 at 10:59 PM, Continuation wrote: > > MySQL has better replication support. > > MySQL has built-in replication based on log shipping. > > Postgresql doesn't have built in replication. You have to use external > tools. From > http://www.wikivs.com/wiki

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Tim Chase
> I personally don't have any experience with PostgreSQL and I'm generally > working in a mixed MS and Linux environment. I'm interested to hear peoples > views on the pluses and minuses of the two different systems. I'm a bit of a > query geek too. How does that play in? I know in MySQL there are

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Continuation
MySQL has better replication support. MySQL has built-in replication based on log shipping. Postgresql doesn't have built in replication. You have to use external tools. From http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL#PostgreSQL_Replication_Weakness: "Slony-I, the most widely used PostgreS

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Joshua Russo
On Fri, Sep 4, 2009 at 9:01 PM, Léon Dignòn wrote: > > One of many: > PostgreSQL supports naive foreign referential-integrity constraints. > MySQL (default: myISAM) does it only with InnoDB which leads to other > Problems: http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html > > On Se

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-04 Thread Léon Dignòn
One of many: PostgreSQL supports naive foreign referential-integrity constraints. MySQL (default: myISAM) does it only with InnoDB which leads to other Problems: http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html On Sep 4, 10:29 pm, Joshua Russo wrote: > I personally don't have any

Re: PostgreSQL Stored Procedure in ordinary Django query expression?

2009-07-23 Thread Russell Keith-Magee
On Thu, Jul 23, 2009 at 11:55 PM, Adam Seering wrote: > > Hey folks, >        I have a PostgreSQL stored procedure that does some fairly complex > logic to query/filter a particular table (though it ultimately does > return rows straight from that table).  I'm trying to call this stored > procedur

Re: PostgreSQL Stored Procedure in ordinary Django query expression?

2009-07-23 Thread Glenn Maynard
On Thu, Jul 23, 2009 at 11:55 AM, Adam Seering wrote: >        I have a PostgreSQL stored procedure that does some fairly complex > logic to query/filter a particular table (though it ultimately does > return rows straight from that table).  I'm trying to call this stored > procedure from within D

Re: PostgreSQL full text engine support

2009-06-10 Thread Adrián Ribao
I'm sorry! This messages was suppose to go to the haystack.org list. Please, dismiss this message. On 10 jun, 13:57, Adrián Ribao wrote: > I'd like to suggest the fulltext search engine of PostgreSQL as a > backend. > > PostgreSQL is the favourite ddbb of the django developers, and it > include

Re: PostgreSQL case sensitive icontains

2009-02-20 Thread Karen Tracey
On Fri, Feb 20, 2009 at 12:00 PM, Alessandro Ronchi < alessandro.ron...@soasi.com> wrote: > > with postgreSQL I get case sensitive filters also with icontains. I do not see this behavior: Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyrig

Re: Postgresql v MySQL

2009-02-08 Thread richr
Barry Pederson has nice, short example of adding PostgreSQL full text search to an existing Djanog app at: http://barryp.org/blog/entries/postgresql-full-text-search-django/ On Feb 8, 11:22 am, Alex Gaynor wrote: > On Sun, Feb 8, 2009 at 11:20 AM, Petite Abeille > wrote: > > > > > > > > >

Re: Postgresql v MySQL

2009-02-08 Thread AmanKow
I started with mysql and moved to postgres. My main reasons: 1) If you ever need to dumpdata/loaddata, you may find that postgres (correctly) defers checking of fk constraints until after the a transaction is complete. MySQL checks the constraints as each record is added, even inside of a trans

Re: Postgresql v MySQL

2009-02-08 Thread Justin Bronn
On Feb 7, 8:06 am, Tim Chase wrote: > PostgreSQL has built-in GIS data-types and functions, which I > believe are required for theGeoDjangofunctionality (or Oracle). >   PG also allows flexible creation of new data-types and > functions/operators as shown by the GIS data-types that were > integra

Re: Postgresql v MySQL

2009-02-08 Thread Alex Gaynor
On Sun, Feb 8, 2009 at 11:20 AM, Petite Abeille wrote: > > > On Feb 8, 2009, at 5:17 PM, Peter2108 wrote: > > > Thanks. Between posting and your response I found out that MySQL > > has built in support for full-text searchs but PostgreSQL does not. > > Hmmm... > > http://www.postgresql.org/docs/8.

Re: Postgresql v MySQL

2009-02-08 Thread Petite Abeille
On Feb 8, 2009, at 5:17 PM, Peter2108 wrote: > Thanks. Between posting and your response I found out that MySQL > has built in support for full-text searchs but PostgreSQL does not. Hmmm... http://www.postgresql.org/docs/8.3/static/textsearch.html -- PA. http://alt.textdrive.com/nanoki/ --~

Re: Postgresql v MySQL

2009-02-08 Thread Peter2108
Thanks. Between posting and your response I found out that MySQL has built in support for full-text searchs but PostgreSQL does not. But Django seems as happy with the one as the other. -- Peter On Feb 7, 2:06 pm, Tim Chase wrote: > > Is there any clear reason for preferring one of these DBMS o

Re: Postgresql v MySQL

2009-02-07 Thread Tim Chase
> Is there any clear reason for preferring one of these DBMS over the > other for use with Django (1.0 onwards). Historically, PostgreSQL has favored correctness, ANSI standards, and data-integrity while MySQL has favored speed and pluggability. For the most part, they've reached equilibrium.

Re: PostgreSQL with Psycopg2

2008-10-13 Thread leonel
Gaus wrote: > Hi All > I am developing my first-Django based project by myself. Wanted to use > Postgresql with Psycopg2 & dont want to use Sqlite or Mysql for that > matter. I have a problem which I cant rectify. My development > environment is as follows : > > 1. Ubuntu 8.04 > 2. Python2.5 - com

  1   2   >