[GENERAL] searching for characters via the hexidecimal value

2011-01-24 Thread Geoffrey Myers
Is there a way to search for a character in the database by the hexidecimal value of that character? -- Until later, Geoffrey "I predict future happiness for America if they can prevent the government from wasting the labors of the people under the pretense of taking care of them." - Thomas Jef

Re: [GENERAL] searching for characters via the hexidecimal value

2011-01-24 Thread Massa, Harald Armin
yes, there is. select from where like '%'||chr(x'42'::int)||'%' where '42' is your hexadecimal character value. Be sure to read and understand everything you can find about encodings; and make sure the hexadecimal value you are searching for is from the same encoding. Best wishes, Harald

[GENERAL] error while trying to change the database encoding on a database

2011-01-24 Thread Geoffrey Myers
We need to change the database encoding on our databases as they were created with the wrong encoding. They were created as SQL_ASCII and we are changing them to UTF8. When testing this Friday, I received the following error: pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore:

Re: [GENERAL] searching for characters via the hexidecimal value

2011-01-24 Thread Geoffrey Myers
Massa, Harald Armin wrote: yes, there is. select from where like '%'||chr(x'42'::int)||'%' This does not work for me, but if I convert the hex value to octal this does work: select comments from fax where comments ~* E'\231'; where '42' is your hexadecimal character value. Be sure t

[GENERAL] (Hopefully stupid) select question.

2011-01-24 Thread Fredric Fredricson
I have been fighting with a select and can find no satisfactory solution. Simplified version of the problem: A table that, in reality, log state changes to an object (represented as a row in another table): CREATE TABLE t ( id SERIAL UNIQUE, ref INTEGER, -- Reference to a row in anoth

Re: [GENERAL] error while trying to change the database encoding on a database

2011-01-24 Thread Adrian Klaver
On Monday 24 January 2011 6:38:55 am Geoffrey Myers wrote: > We need to change the database encoding on our databases as they were > created with the wrong encoding. They were created as SQL_ASCII and we > are changing them to UTF8. > > When testing this Friday, I received the following error: > >

Re: [GENERAL] (Hopefully stupid) select question.

2011-01-24 Thread Tom Lane
Fredric Fredricson writes: > ... Now I want the latest "someData" for each "ref" like: > The best solution I could find depended on the fact that serial is > higher for higher dates. I do not like that because if that is true, it > is an indirect way to get the data and could possibly, in the f

Re: [GENERAL] error while trying to change the database encoding on a database

2011-01-24 Thread Geoffrey Myers
Adrian Klaver wrote: On Monday 24 January 2011 6:38:55 am Geoffrey Myers wrote: We need to change the database encoding on our databases as they were created with the wrong encoding. They were created as SQL_ASCII and we are changing them to UTF8. When testing this Friday, I received the follo

Re: [GENERAL] (Hopefully stupid) select question.

2011-01-24 Thread A.M.
On Jan 24, 2011, at 10:50 AM, Fredric Fredricson wrote: > I have been fighting with a select and can find no satisfactory solution. > > Simplified version of the problem: > > A table that, in reality, log state changes to an object (represented as a > row in another table): > > CREATE TABLE t

Re: [GENERAL] error while trying to change the database encoding on a database

2011-01-24 Thread Adrian Klaver
On Monday 24 January 2011 7:57:52 am Geoffrey Myers wrote: > Adrian Klaver wrote: > > On Monday 24 January 2011 6:38:55 am Geoffrey Myers wrote: > >> We need to change the database encoding on our databases as they were > >> created with the wrong encoding. They were created as SQL_ASCII and we >

Re: [GENERAL] error while trying to change the database encoding on a database

2011-01-24 Thread Geoffrey Myers
Adrian Klaver wrote: On Monday 24 January 2011 7:57:52 am Geoffrey Myers wrote: Adrian Klaver wrote: On Monday 24 January 2011 6:38:55 am Geoffrey Myers wrote: We need to change the database encoding on our databases as they were created with the wrong encoding. They were created as SQL_ASCII

Re: [GENERAL] error while trying to change the database encoding on a database

2011-01-24 Thread Adrian Klaver
On Monday 24 January 2011 8:06:38 am Geoffrey Myers wrote: > Adrian Klaver wrote: > > On Monday 24 January 2011 7:57:52 am Geoffrey Myers wrote: > >> Adrian Klaver wrote: > >>> On Monday 24 January 2011 6:38:55 am Geoffrey Myers wrote: > We need to change the database encoding on our databases

Re: [GENERAL] error while trying to change the database encoding on a database

2011-01-24 Thread Geoffrey Myers
Adrian Klaver wrote: On Monday 24 January 2011 8:06:38 am Geoffrey Myers wrote: Adrian Klaver wrote: On Monday 24 January 2011 7:57:52 am Geoffrey Myers wrote: Adrian Klaver wrote: On Monday 24 January 2011 6:38:55 am Geoffrey Myers wrote: We need to change the database encoding on our datab

Re: [GENERAL] error while trying to change the database encoding on a database

2011-01-24 Thread Martijn van Oosterhout
On Mon, Jan 24, 2011 at 12:16:46PM -0500, Geoffrey Myers wrote: > We hope to identify the characters and fix them in the existing > database, then convert. It appears to be very limited, but it would > help if there was some way to identify these characters outside of > simply doing the relo

Re: [GENERAL] error while trying to change the database encoding on a database

2011-01-24 Thread Adrian Klaver
On 01/24/2011 09:16 AM, Geoffrey Myers wrote: We hope to identify the characters and fix them in the existing database, then convert. It appears to be very limited, but it would help if there was some way to identify these characters outside of simply doing the reload of the data and finding th

Re: [GENERAL] (Hopefully stupid) select question.

2011-01-24 Thread Fredric Fredricson
On 01/24/2011 04:56 PM, Tom Lane wrote: Fredric Fredricson writes: ... Now I want the latest "someData" for each "ref" like: The best solution I could find depended on the fact that serial is higher for higher dates. I do not like that because if that is true, it is an indirect way to get the d

Re: [GENERAL] error while trying to change the database encoding on a database

2011-01-24 Thread Geoffrey Myers
Adrian Klaver wrote: On 01/24/2011 09:16 AM, Geoffrey Myers wrote: We hope to identify the characters and fix them in the existing database, then convert. It appears to be very limited, but it would help if there was some way to identify these characters outside of simply doing the reload of t

Re: [GENERAL] (Hopefully stupid) select question.

2011-01-24 Thread Fredric Fredricson
On 01/24/2011 05:02 PM, A.M. wrote: On Jan 24, 2011, at 10:50 AM, Fredric Fredricson wrote: I have been fighting with a select and can find no satisfactory solution. Simplified version of the problem: A table that, in reality, log state changes to an object (represented as a row in another t

[GENERAL] iPad and Pg revisited...

2011-01-24 Thread Jerry LeVan
I have cleaned up my simple Perl cgi script for accessing Postgresql db's... Thanks to Tom Lane's (aka the Wizard) hints the 'describe ' function now works :) The url: http://homepage.mac.com/levanj/Perl I also found a mac php package that has postgresql support ( My mac php systems do *not

Re: [GENERAL] Postgresql as a dictionary coder backend?

2011-01-24 Thread Attila Nagy
On 01/24/2011 03:19 AM, Ben Chobot wrote: On Jan 23, 2011, at 3:29 AM, Attila Nagy wrote: Hello, I'm looking for a database backend for a dictionary coder project. It would have three major tasks: - take a text corpus, get their words and substitute each word by a 64 bit integer (the word:i

Re: [GENERAL] Postgresql as a dictionary coder backend?

2011-01-24 Thread Attila Nagy
On 01/24/2011 05:27 AM, Fredric Fredricson wrote: I can easily do this with any RDBMS, with a table of three columns: auto incremented ID, word and refcount, with a unique index on word. The challenge could be: - that it should scale to several TBs of size and several (hundred) billion of re

Re: [GENERAL] error while trying to change the database encoding on a database

2011-01-24 Thread Adrian Klaver
On 01/24/2011 10:57 AM, Geoffrey Myers wrote: Adrian Klaver wrote: On 01/24/2011 09:16 AM, Geoffrey Myers wrote: We hope to identify the characters and fix them in the existing database, then convert. It appears to be very limited, but it would help if there was some way to identify these cha

[GENERAL] Separating the ro directory of the DB engine itself from the rw data areas . . .

2011-01-24 Thread Albretch Mueller
~ I need to configure postgreSQL in a way that I could run it from a directory mounted as read only, with separate rw partitions mounted for the data, logs, . . . ~ What would be the steps to follow and the issues to take into consideration? ~ thanks lbrtchx -- Sent via pgsql-general mailing

[GENERAL] Re: Separating the ro directory of the DB engine itself from the rw data areas . . .

2011-01-24 Thread Albretch Mueller
... better yet; is it possible to configure postgreSQL in a way that it depends on external variables set via the OS in the same process in which it is started? ~ lbrtchx -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.post