Re: [GENERAL] Storing HTML: HTML entities being rendered in that raw form

2009-04-10 Thread Richard Huxton
linnewbie wrote: What I have on disk would be: Bonnie & Clyde which would usually be rendered as: Bonnie & Clype but this is not happening, it's being rendered as: Bonnie & Clyde There are only three options. 1. That is *not* what you have stored in the database, it's being escaped on t

Re: [GENERAL] Storing HTML: HTML entities being rendered in that raw form

2009-04-10 Thread Marco Colombo
linnewbie wrote: > On Apr 9, 1:00 pm, st...@blighty.com (Steve Atkins) wrote: >> On Apr 9, 2009, at 9:27 AM, linnewbie wrote: >> >>> Hi all, >>> I have stored HTML in a text field that I subsequently render on the >>> web. However when I retrieve and render this data on the web I am >>> getting t

Re: [GENERAL] Evidently no support for the mmddyyyy date format

2009-04-10 Thread Raymond O'Donnell
On 09/04/2009 23:56, Bernard Barton wrote: > Today I tried every permutation of the DateStyle parameter I could find, and > still cannot get PostgreSQL 8.3 to accept dates in the format mmdd. I > tried How exactly are you sending these values to the database? Straight SQL, or some other mech

Re: [GENERAL] Evidently no support for the mmddyyyy date format

2009-04-10 Thread Pavel Stehule
Hello use to_date function, please. postgres=# select to_date('10122008','DDMM'); to_date 2008-12-10 (1 row) Time: 1,152 ms postgres=# regards Pavel Stehule 2009/4/10 Raymond O'Donnell : > On 09/04/2009 23:56, Bernard Barton wrote: >> Today I tried every permutation of the

[GENERAL] index usage in various scenarious

2009-04-10 Thread adam.slachta
Hello, QUESTION1: Can somebody clarify in what of the proposed scenarios is the following index used? Any further comment will be greatly appreciated. QUESTION2: Does any other scenarios when an index is NOT used (and someone might possibly expect it is used) come to your mind? Thank you v

Re: [GENERAL] Evidently no support for the mmddyyyy date format

2009-04-10 Thread bfb21
This is embedded SQL in a .pgc file. You can see the "c_docket_date between :date1 and :date2" line in the select statement, which is where the dates are porcessed. If I pass a date in the mm-dd- format it works. However, the application I'm porting is all based on dates in the mmdd form

Re: [GENERAL] Evidently no support for the mmddyyyy date format

2009-04-10 Thread bfb21
Yes, I mentioned that I could use the to_date function, but as I said, that would involve a LOT of changes to a LOT of source code, which I'm trying to avoid. -Thanks - Original Message - From: "Pavel Stehule" To: r...@iol.ie Cc: "Bernard Barton" , pgsql-general@postgresql.org

Re: [GENERAL] Evidently no support for the mmddyyyy date format

2009-04-10 Thread Pavel Stehule
2009/4/10 : > Yes, I mentioned that I could use the to_date function, but as I said, that > would involve a LOT of changes to a LOT of source code, which I'm trying to > avoid. > other solution is custom datatype. It isn't too much work, but it is coding in C. regards Pavel Stehule > -Thanks >

Re: [GENERAL] complicated query (newbie..)

2009-04-10 Thread Marcin Krol
Thanks a lot, Sam (and others), thanks to your help I managed to finally produce the query I wanted. Regards, mk -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Querying a Large Partitioned DB

2009-04-10 Thread Justin Funk
Team Amazing, I am building a massive database for storing the syslogs of a room of servers. The database gets about 25 million entries a day, and need to keep them for 180 days. So the total size of the database will be about 4.5 billion records. I need to be able to do full text searches on the

[GENERAL] Multiple character encodings within a single database/table?

2009-04-10 Thread Dann Corbit
If I have the C locale, can I have multiple character encodings within: 1. A single database? 2. A single table? More specifically, I would like to be able to have Unicode columns and ASCII text columns within the same table. Is this possible? If so, how do I achieve it? It was not clear to m

Re: [GENERAL] INSERT or UPDATE

2009-04-10 Thread Dann Corbit
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of James B. Byrne > Sent: Monday, April 06, 2009 1:46 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] INSERT or UPDATE > > I have spent the last couple of day

Re: [GENERAL] Querying a Large Partitioned DB

2009-04-10 Thread Tom Lane
Justin Funk writes: > Can you give me any tips and suggestions about how to speed this up? Use fewer partitions --- 180 is a lot. Maybe weekly partitioning would be about right. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] Evidently no support for the mmddyyyy date format

2009-04-10 Thread Bruce Momjian
Pavel Stehule wrote: > 2009/4/10 : > > Yes, I mentioned that I could use the to_date function, but as I said, that > > would involve a LOT of changes to a LOT of source code, which I'm trying to > > avoid. > > > > other solution is custom datatype. It isn't too much work, but it is > coding in C.

Re: [GENERAL] Multiple character encodings within a single database/table?

2009-04-10 Thread Tom Lane
"Dann Corbit" writes: > If I have the C locale, can I have multiple character encodings within: > 1. A single database? > 2. A single table? No. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscriptio

Re: [GENERAL] Querying a Large Partitioned DB

2009-04-10 Thread A.M.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Apr 10, 2009, at 10:15 AM, Justin Funk wrote: Team Amazing, I am building a massive database for storing the syslogs of a room of servers. The database gets about 25 million entries a day, and need to keep them for 180 days. So the total siz

Re: [GENERAL] Evidently no support for the mmddyyyy date format

2009-04-10 Thread Adrian Klaver
- bf...@comcast.net wrote: > This is embedded SQL in a .pgc file. You can see the "c_docket_date > between :date1 and :date2" line in the select statement, which is > where the dates are porcessed. If I pass a date in the mm-dd- > format it works. However, the application I'm porting i

Re: [GENERAL] Multiple character encodings within a single database/table?

2009-04-10 Thread Steve Atkins
On Mar 23, 2009, at 3:50 PM, Dann Corbit wrote: If I have the C locale, can I have multiple character encodings within: 1. A single database? 2. A single table? No. More specifically, I would like to be able to have Unicode columns and ASCII text columns within the same table. Is this

[GENERAL] Internationalization

2009-04-10 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm wondering how to internationalize contents of a table, short of having a column for each language string ... Anyone with some experience to share? :) Regards, Pedro Doria Meunier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Li

Re: [GENERAL] Multiple character encodings within a single database/table?

2009-04-10 Thread Bruce Momjian
Steve Atkins wrote: > > On Mar 23, 2009, at 3:50 PM, Dann Corbit wrote: > > > If I have the C locale, can I have multiple character encodings > > within: > > 1. A single database? > > 2. A single table? > > No. > > > > > More specifically, I would like to be able to have Unicode columns and

Re: [GENERAL] Internationalization

2009-04-10 Thread Justin
Pedro Doria Meunier wrote: Hi all, I'm wondering how to internationalize contents of a table, short of having a column for each language string ... Anyone with some experience to share? :) Regards, Pedro Doria Meunier How about parent child table layout. The child table has one record for

[GENERAL] ERROR: array subscript out of range

2009-04-10 Thread chinchu2005
Hello all, Need ur help.I dont know wats wrong with the following fucntion. create or replace function twoarray() returns setof integer as ' declare i integer; j integer; a integer[][]; begin for i in 1..10 loop for j in 1..2 loop a[i][j]:=i*j; return next a[i][j]; end loop; end loop; return; end;

Re: [GENERAL] ERROR: array subscript out of range

2009-04-10 Thread Tom Lane
chinchu2005 writes: > declare > i integer; > j integer; > a integer[][]; > begin > for i in 1..10 loop > for j in 1..2 loop > a[i][j]:=i*j; This isn't going to work --- it implies dynamically resizing the array, and plpgsql isn't smart enough to do that for a multidimensional array. Do you actual

Re: [GENERAL] Internationalization

2009-04-10 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Justin, First of all thank you for your input. :) Actually what I have is a fully internationalized site by means of getttext. *Some* of the content comes from the PGSQL database where 2 tables relation with others (namely for sensor data descript

Re: [GENERAL] ERROR: array subscript out of range

2009-04-10 Thread Alvaro Herrera
chinchu2005 escribió: > > Hello all, > Need ur help.I dont know wats wrong with the following fucntion. > create or replace function twoarray() returns setof integer as > ' > declare > i integer; > j integer; > a integer[][]; > begin > for i in 1..10 loop > for j in 1..2 loop > a[i][j]:=i*j; We j