[GENERAL] Followup to week truncation thread

2005-09-11 Thread Mike Nolan
A few days ago there was a thread dealing with how a 'week' breaks. I just had a need to run a transaction total by week and I wanted a Sunday-Saturday week, not a Monday-Sunday week which is what the date_trunc function gives. Here was my solution: select (date_trunc('week',mtrantime +

Re: [GENERAL] back references using regex

2005-09-11 Thread Matthew Peter
How about this then, I didn't retain that information from the doc. ;) I sometimes glaze over important gems every now and then. It happens. I'm not a robot, yet. At least I know the answer to my question is now retained. You were a big help too. Thank you very much. I appreciate it. Speaking of

[GENERAL] pg_autovacuum not doing anything

2005-09-11 Thread Sim Zacks
I have pg_autovacuum running on my gentoo server, the same server with the postgresql database. ps shows that it is running and I have it start automatically with the system. It is not vacuuming or analyzing the tables though. Am I doing something wrong? Is there a better way to do this? Thank

[GENERAL] index and ilke question

2005-09-11 Thread Joost Kraaijeveld
Hi, I want to use the following query: select * from customers where lastname ilike 'jansen%' Explain says it uses a sequential scan on customers while there is an index on lastname (and 'jansen%' contains 1800 entries in a table of 370.000 customers so a index scan should be more logical?).

Re: [GENERAL] Postgresql Hosting

2005-09-11 Thread Ron Mayer
[EMAIL PROTECTED] wrote: I'm sharing with 5 other small businesses a dedicated server with 60GB hard drive, 700GB monthly bandwidth on a 10Mbps link for $49/month. Where is this available? server4you.net offers such a system today (they claim to be the largest dedicated server host with 6500

[GENERAL] arrays, composite types

2005-09-11 Thread Roman Neuhauser
I'm looking for an equivalent of my_composite_type[] for use as a parameter of a pl/pgsql function. What do people use to dodge this limitation? Background: I have a few plpgsql functions that basically accept an array of objects decomposed into arrays of the objects' attributes: CREATE

Re: [GENERAL] to_ascii, or some other form of magic transliteration

2005-09-11 Thread Mike Rylander
On 9/10/05, Ben [EMAIL PROTECTED] wrote: Hrm, I must be missing something, because I don't see how this will transliterate to ASCII? If you want non-western text to be Romanized you can take a look at Text::Unicode(1). The functionality in the chunk of perl I sent before was stripping of non

[GENERAL] Function to test for Valid Date

2005-09-11 Thread Alex
Hi, is there a way to use postgres to check if a date provided is valid and would return true or false. Thanks Alex ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] arrays, composite types

2005-09-11 Thread Greg Stark
Roman Neuhauser [EMAIL PROTECTED] writes: I'm looking for an equivalent of my_composite_type[] for use as a parameter of a pl/pgsql function. What do people use to dodge this limitation? Background: I have a few plpgsql functions that basically accept an array of objects decomposed into

Re: [GENERAL] Function to test for Valid Date

2005-09-11 Thread Andreas Kretschmer
Alex [EMAIL PROTECTED] schrieb: Hi, is there a way to use postgres to check if a date provided is valid and would return true or false. http://www.postgresql.org/docs/8.0/interactive/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT There is a user comment with a example. Regards,

Re: [GENERAL] arrays, composite types

2005-09-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-09-11 12:11:39 -0400: Roman Neuhauser [EMAIL PROTECTED] writes: I'm looking for an equivalent of my_composite_type[] for use as a parameter of a pl/pgsql function. What do people use to dodge this limitation? Background: I have a few plpgsql functions that

[GENERAL] linux pg pointed to windows partition for db

2005-09-11 Thread mike dixon
Tried a couple other places and aren't getting anywhere. A windows xp program I use uses pgsql; I'd like to create a backup of the db but from within linux without xp running (I run xp in vmware; and the xp db backup will be written to an ext* partition). I have the same rev pgsql installed

Re: [GENERAL] What happens when wal fails?

2005-09-11 Thread Neil Conway
Tom Lane wrote: Joseph Shraibman jks@selectacast.net writes: If I put the pg_xlog directory on its own disk, then that disk fails, does that mean the postgres is hosed or does it just mean that postgres no longer safe from a power outage? The latter. The WAL is actually write-only during

Re: [GENERAL] back references using regex

2005-09-11 Thread Michael Fuhr
On Sun, Sep 11, 2005 at 12:30:59AM -0700, Matthew Peter wrote: Speaking of data manipulation in a table... I was thinking about storing and manipulating a list in a column... Please ask new questions in a new thread with a Subject header related to the new topic. People who might be

[GENERAL] list manipulation at column level

2005-09-11 Thread Matthew Peter
Is it possible to append and delete (unknown location) items in a list stored in a column? For instance, a column with 'some,values,in,a,list,12,34'; Could I [ap|pre]pend and or delete items in this list through pgsql?

Re: [GENERAL] list manipulation at column level

2005-09-11 Thread Chris Travers
Matthew Peter wrote: Is it possible to append and delete (unknown location) items in a list stored in a column? For instance, a column with 'some,values,in,a,list,12,34'; Could I [ap|pre]pend and or delete items in this list through pgsql? prepend: 'value' || ',' || column append

Re: [GENERAL] list manipulation at column level

2005-09-11 Thread Michael Fuhr
On Sun, Sep 11, 2005 at 04:02:24PM -0700, Chris Travers wrote: Matthew Peter wrote: Is it possible to append and delete (unknown location) items in a list stored in a column? For instance, a column with 'some,values,in,a,list,12,34'; Could I [ap|pre]pend and or delete items in this list

Re: [GENERAL] list manipulation at column level

2005-09-11 Thread Matthew Peter
I was reading the concatenation operator earlier. Postgresql is very neat. What about deleting an item in the array without knowing it's position? For example, deleting the item 12 in the array? Is that possible? Like using UPDATE array_delete_at(array_find(a,'12')); where a is the column and

Re: [GENERAL] pg_autovacuum not doing anything

2005-09-11 Thread Thomas F. O'Connell
How do you know that it is not vacuuming or analyzing anything? And which version of postgres did you build/acquire pg_autovacuum from? It seems that in post-8.0 versions, there is almost no output by default. You could try increasing the debug output using -d 1 or -d 2 on the command line