Re: [GENERAL] FTS uses "tsquery" directly in the query

2010-01-23 Thread Oleg Bartunov
Xu, FTS has nothing with your problem, it's general limitation/feature. Oleg On Sat, 23 Jan 2010, xu fei wrote: Hi, everyone: First I can successful run this query:select name, ts_rank_cd(vectors, query) as rank from element, to_tsquery('item') query where query @@ vectors order by rank desc;

[GENERAL] Recursion in triggers?

2010-01-23 Thread Gauthier, Dave
Hi: I'm dealing with a hierarchical design where changes in one record can and should cause changes in other records lower inthe hierarchy. I'm trying to use update triggers to do this. And recursion would be a real nice way to do this. What I need to know is if, in the "after" update trigge

Re: [GENERAL] [LibPQ] Trying PQconnectStart: it doesn't seem to connect

2010-01-23 Thread Craig Ringer
On 23/01/2010 11:52 PM, Alessandro Agosto wrote: Hi, i'm a python/c developer and i need an asynchronous (python) interface to communicate with a database. I like PostgreSQL so i'm trying to write a mock-up for a python extension module to use LibPQ in my asynchronous programs. What's wrong wit

[GENERAL] FTS uses "tsquery" directly in the query

2010-01-23 Thread xu fei
Hi, everyone: First I can successful run this query:select name, ts_rank_cd(vectors, query) as rank from element, to_tsquery('item') query where query @@ vectors order by rank desc;But actually I want to run this one:select name, ts_rank_cd(vectors, query) as rank from element, 'item'::tsquery q

Re: [GENERAL] Slow Query / Check Point Segments

2010-01-23 Thread John R Pierce
Greg Smith wrote: John R Pierce wrote: I know the database has a lot of write volume overall, and its only one of several databases running in different zones on the server. I know nothing about the SAN, I suspect its a EMC Symmetrix of some sort. Probably a generation or two behind latest.

Re: [GENERAL] more docs on extending postgres in C

2010-01-23 Thread Dimitri Fontaine
Ivan Sergio Borgonovo writes: > - installing postgresql-server-dev-[version] > - apt-get source postgresql-server-dev-[version] > - copy from there a contrib dir in my ~ (or wherever you prefer) > - export USE_PGXS=1; make Don't forget apt-get build-dep postgresql-[version] > I didn't have postg

Re: [GENERAL] Mapping Java BigDecimal

2010-01-23 Thread Lew
Jakub Bednář wrote: Hi All, We decide add support PostgreSQL database (now supporting only Oracle database) to our product. In Oracle we mapping Java BigDecimal to number(19, 2), in PostgreSQL to numeric(19, 2). If I store to "BigDecimal column" number without decimal, e.g. "3", than Orac

Re: [GENERAL] Slow Query / Check Point Segments

2010-01-23 Thread Greg Smith
John R Pierce wrote: I know the database has a lot of write volume overall, and its only one of several databases running in different zones on the server. I know nothing about the SAN, I suspect its a EMC Symmetrix of some sort. Probably a generation or two behind latest. The operations p

Re: [GENERAL] Old/New

2010-01-23 Thread Adrian Klaver
On Saturday 23 January 2010 7:51:28 am Bob Pawley wrote: > I havn't been able to find documentation on how to use \d. When I open the > psql interface (through either port ) it asks for a password but doesn't > allow any entry of a password. That would depend on the settings in pg_hba.conf, whethe

Re: [GENERAL] Referencing to system catalog problem

2010-01-23 Thread Adrian Klaver
On Saturday 23 January 2010 6:15:36 am Davor J. wrote: > I am logged in as superuser. I am trying to create something similar to > this: > > > Code: > CREATE TABLE tbl_unit_convfunctions( > unit_from integer REFERENCES tbl_units (unit_id), > unit_to integer REFERENCES tbl_units (unit_id), > proc_id

Re: [GENERAL] MySQL -> Postgres migration tools?

2010-01-23 Thread Devrim GÜNDÜZ
On Fri, 2010-01-22 at 11:15 -0800, Erik Jones wrote: > Does anyone know of any good, current migration tools out there? There is an open source tool developed by EnterpriseDB: MigrationWizard http://www.enterprisedb.com/openDownloads.do?productId=407&redirectReason=true&productVersion=otherDownl

Re: [GENERAL] Old/New

2010-01-23 Thread Raymond O'Donnell
On 23/01/2010 15:51, Bob Pawley wrote: > I havn't been able to find documentation on how to use \d. When I open Hi Bob, In brief: \dt lists all the tables in the current schema \d gives the structure of the named table .. and loads of others. The docs are here: http://www.postgresql.

Re: [GENERAL] MySQL -> Postgres migration tools?

2010-01-23 Thread Grzegorz Jaśkiewicz
2010/1/23 Craig Ringer : > > An InnoDB `AUTO_INCREMENT' column under MySQL 5.x is pretty similar to a > sequence. > > I increasingly think it's pretty safe to just >  's/AUTO_INCREMENT/SERIAL/g' > in DDL. Apps that use MyISAM aren't going to be fussy about how it works, > and apps that use InnoDB g

[GENERAL] [LibPQ] Trying PQconnectStart: it doesn't seem to connect

2010-01-23 Thread Alessandro Agosto
Hi, i'm a python/c developer and i need an asynchronous (python) interface to communicate with a database. I like PostgreSQL so i'm trying to write a mock-up for a python extension module to use LibPQ in my asynchronous programs. I've started to study the docs about libpq just yesterday, so if i m

Re: [GENERAL] Old/New

2010-01-23 Thread Bob Pawley
I havn't been able to find documentation on how to use \d. When I open the psql interface (through either port ) it asks for a password but doesn't allow any entry of a password. However, after my last e-mail to you, I came across something interesting - at least to me. I use pg_admin script

[GENERAL] Referencing to system catalog problem

2010-01-23 Thread Davor J.
I am logged in as superuser. I am trying to create something similar to this: Code: CREATE TABLE tbl_unit_convfunctions( unit_from integer REFERENCES tbl_units (unit_id), unit_to integer REFERENCES tbl_units (unit_id), proc_id oid REFERENCES pg_proc (oid) )but no matter what I refer to from pg_pr

Re: [GENERAL] Error "invalid byte sequence for encoding UTF8" on insert into BYTEA column

2010-01-23 Thread Alan Millington
>You probably need to ask the mxODBC developers (who AFAIK don't hang out >on this list) what they are doing with that data.  It sounds fairly >likely to me that the bytea value is just being sent as a string without >any special encoding.  That would explain both the null sensitivity you >mention

Re: [GENERAL] Slow Query / Check Point Segments

2010-01-23 Thread John R Pierce
Greg Smith wrote: My guess is that there's something wrong with your config such that writes followed by fsync are taking longer than they should. When I see "sync=0.640 s" into a SAN where that sync operation should be near instant, I'd be looking for issues in the ZFS intent log setup, how

Re: [GENERAL] MySQL -> Postgres migration tools?

2010-01-23 Thread Craig Ringer
On 23/01/2010 3:31 PM, Grzegorz Jaśkiewicz wrote: On Fri, Jan 22, 2010 at 7:15 PM, Erik Jones wrote: Hello, Given that the EU has approved Oracle's acquisition of Sun w/ MySQL it's fairly likely that there may be a number of people and companies looking to move from MySQL to Postgres in the