Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
If you're going to truncate the NOW(), just go with CURRENT_DATE instead. Thanks for the "CURRENT_DATE" tip, Adam. Works fine! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
OK, so you want to see if a timestamp is greater than now()? Why not just compare them? where a.from_datetime >= now() No, not the whole timestamp. I dont want to check the time. So I had to truncate the datetime with: date_trunc('day', a.from_datetime) >= date_trunc('day', NOW()) -- Sent

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
This query makes little sense. Why are you trying to convert a timestamp to a timestamp? Is this a bizarre substitute for date_trunc()? Got it: Thanks for the "date_trunc" tip. This query works fine: date_trunc('day', a.from_datetime) >= date_trunc('day', NOW()) -- Sent via pgsql-general m

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
This query makes little sense. Why are you trying to convert a timestamp to a timestamp? Is this a bizarre substitute for date_trunc()? The "from_datetime" column is of type "timestamp" but I want to check only the date, not the time. In this example I want to retrieve all records whose "fr

[GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
Dear list members I have upgraded my PostgreSQL 8.2.6 to 8.3.6 and I am having trouble with calling "to_timestamp" function. Here is the query I use: SELECT a.* FROM tblevent a WHERE to_timestamp(a.from_datetime,'/MM/DD') >= to_timestamp( NOW(),'/MM/DD' ) ORDER BY a.from_dat

[GENERAL] gmake Error "/libpython2.4.a: could not read symbols: Bad value" with ./configure --with-python

2007-02-15 Thread Nico Grubert
Dear list members, I am trying to install Postgresql-8.2.3 on a Suse Linux Enterprise Server 10.1 64-Bit with Python 2.4.4. At the "gmake" command I get 2 errors (see below). I ran: ./configure --with-python --with-openssl gmake Here are the last lines of the gmake process:

Re: [GENERAL] Sorting with DISTINCT ON

2007-01-08 Thread Nico Grubert
It does allow you to sort on both columns. SELECT DISTINCT ON (path) path, comment_id, created, title FROM bewertungen.tblcomments ORDER BY path, created Thank you very much. Works perfect! :-) ---(end of broadcast)--- TIP 3: Have you

[GENERAL] Sorting with DISTINCT ON

2007-01-08 Thread Nico Grubert
Hi there, I have a problem sorting a SQL result if I use DISTINCT ON. I have a table "tblcomment" with these columns: id (serial) path (varchar) created (timestamp) title (varchar) These records are in the table "tblcomment": id pathcreated title --

[GENERAL] Logging in postgresql.conf - no SQL statements are logged

2006-11-10 Thread Nico Grubert
Dear list members, I would like to enable logging and write every SQL command that is executed in a logfile so I modified the "postgresql.conf" file in order to log everything. I restarted the Postgres SQL server. Unfortunately, no SQL statements are logged in the logfile. Here is a snippet

[GENERAL] Monitoring Postgres - Get the SQL queries which are sent to postgres

2006-10-25 Thread Nico Grubert
Dear list members, I have a web application running that is connected to my postgres database. This web application builds dynamically SQL queries and queries the postgres database. I would like to see these SQL queries. How can I do this? Is there a way to monitor the SQL queries which are s

Re: [GENERAL] How to reset a sequence so it will start with 1 again?

2006-01-13 Thread Nico Grubert
Take a look at the docs, in particular the three-parameter version of setval and the is_called flag. http://www.postgresql.org/docs/current/interactive/functions- sequence.html Thanks Michael, SELECT setval('tblperson_id_seq', 1, false); will do exactly what I supposed to get. Nico

[GENERAL] How to reset a sequence so it will start with 1 again?

2006-01-13 Thread Nico Grubert
Hi there, I would like to reset a sequence so its id will start with 1 if I insert a new record into the table, after I have deleted all records from the table. I am using Postgres 8.03 and here is what I tried: test=# create table tblperson ( test(# id SERIAL NOT NULL, test(# name VARCHAR(2

[GENERAL] Re: [GENERAL] Sorting problems with SELECT * FROM table WHERE name LIKE 'Ö %'

2005-10-31 Thread Nico Grubert
I have a problem when sorting records with: SELECT * FROM table WHERE name LIKE 'Ö%' I am running Postgres 8.02 with a database whose character encoding is UNICODE. The SQL Query SELECT * FROM member WHERE name LIKE 'O%' OR name like 'Ö%' ORDER BY name re

[GENERAL] Re: [GENERAL] Sorting problems with SELECT * FROM table WHERE name LIKE 'Ö %'

2005-10-30 Thread Nico Grubert
Ah, I found it: lc_collate: [EMAIL PROTECTED] lc_ctype: [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] Re: [GENERAL] Sorting problems with SELECT * FROM table WHERE name LIKE 'Ö %'

2005-10-30 Thread Nico Grubert
... but what locale is it using? (See LC_COLLATE and LC_CTYPE.) Can I find out out these settings in "phpPgAdmin"? Or can I use LC_COLLATE and LC_CTYPE in the SQL Query? ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ig

[GENERAL] Sorting problems with SELECT * FROM t able WHERE name LIKE 'Ö%'

2005-10-30 Thread Nico Grubert
Hi there, I have a problem when sorting records with: SELECT * FROM table WHERE name LIKE 'Ö%' I am running Postgres 8.02 with a database whose character encoding is UNICODE. The SQL Query SELECT * FROM member WHERE name LIKE 'O%' OR name like 'Ö%' ORDER BY