diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-09-02 20:46:00 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-09-02 20:46:00 +0000 |
| commit | ccbea84834a9f530c2019671787188599d2e148b (patch) | |
| tree | 106e0ff7418cdd1dbd8314bd8d0e2e86775dc09a /django/core/db/backends/postgresql.py | |
| parent | 95e8688d7f8c9393d0e1112b52e22e713f5fa25f (diff) | |
Fixed #404 -- Fixed random ordering in MySQL by abstracting random function into db backend modules. Thanks, mattycakes@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/db/backends/postgresql.py')
| -rw-r--r-- | django/core/db/backends/postgresql.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/core/db/backends/postgresql.py b/django/core/db/backends/postgresql.py index 0afeec6f30..150bc3f888 100644 --- a/django/core/db/backends/postgresql.py +++ b/django/core/db/backends/postgresql.py @@ -77,6 +77,9 @@ def get_limit_offset_sql(limit, offset=None): sql += " OFFSET %s" % offset return sql +def get_random_function_sql(): + return "RANDOM()" + def get_table_list(cursor): "Returns a list of table names in the current database." cursor.execute(""" |
