Re: [GENERAL] Tuning to speed select

2006-08-10 Thread Alban Hertroys
Richard Broersma Jr wrote: Views certainly help in managing complexity. They do nothing to improve query-speed. Querying a view gets rewritten to queries to the underlying tables on the fly. (as long as there are no materialized views, which are still on a the TODO list) Would partial indexs o

[GENERAL] psycopg problem

2006-08-10 Thread Roger Mason
Hello, I'm trying to use psycopg2 to create tables in a database using: run = "S90040" curs.execute("create table %s (date text, tset text)",(run,)) but it fails with Traceback (most recent call last): File "write_xy_to_pg_psyco.py", line 44, in ? curs.execute("create table %s (date text,

Re: [GENERAL] psycopg problem

2006-08-10 Thread Volkan YAZICI
On Aug 10 07:57, Roger Mason wrote: > run = "S90040" > curs.execute("create table %s (date text, tset text)",(run,)) Please see this[1] and this[2]. [1] http://archives.postgresql.org/pgsql-general/2006-07/msg00706.php [2] http://archives.postgresql.org/pgsql-general/2006-07/msg00707.php Regard

Re: [GENERAL] psycopg problem

2006-08-10 Thread Roger Mason
Volkan YAZICI <[EMAIL PROTECTED]> writes: > On Aug 10 07:57, Roger Mason wrote: >> run = "S90040" >> curs.execute("create table %s (date text, tset text)",(run,)) > > Please see this[1] and this[2]. > > [1] http://archives.postgresql.org/pgsql-general/2006-07/msg00706.php > [2] http://archives.po

Re: [GENERAL] PITR timeline question

2006-08-10 Thread Csaba Nagy
> There's been some speculation about allowing a standby server to execute > purely read-only operations, but it's just speculation so far. To add some more speculations, I wonder if that can be workable at all... given that the data pages are overwritten by WAL records, and not under transactiona

[GENERAL] corruption - toasted table

2006-08-10 Thread Silvela, Jaime \(Exchange\)
I think this cropped up before, but can’t find it.   I’ve run into a problem in which I get “Missing chunk number 0 for toast value 642223827” I’ve tried reindexing the table and restarting the server, but the problem persists.   I located an archive   “hunt down the damaged main row

Re: [GENERAL] Accessing Database Data from C Function

2006-08-10 Thread Merlin Moncure
On 8/8/06, Jeffrey Bigham <[EMAIL PROTECTED]> wrote: Not really. Basically I know C decently enough and would have to learn PL/pgSQL (although it looks pretty easy). Perl sounds quite attractive for the added benefit of text-processing as you mention. I also have some vague understanding that

Re: [GENERAL] Tuning to speed select

2006-08-10 Thread Merlin Moncure
On 8/9/06, Tom Laudeman <[EMAIL PROTECTED]> wrote: The speed of the query is (as Michael implies) limited to the rate at which the disk can seek and read. I have done experiments with views and cursors; there was no improvement in speed. I've also tried only pulling back primary keys in the ho

Re: [GENERAL] read only transaction, temporary tables

2006-08-10 Thread Carl R. Brune
Thanks for the information clarifications. Carl B. On Tue, 8 Aug 2006, Carl R. Brune wrote: I should have added that I want to make further use of the temporary table after the COMMIT -- the rollback approach you propose makes it go away. Carl Brune On Tue, 8 Aug 2006, John DeSoi wrote: O

Re: [GENERAL] Tuning to speed select

2006-08-10 Thread Tom Laudeman
Reece, We have some multi-column indexes. Speed of insert, update, and delete are not an issue since this data is essentially static: write-once, read-many. As far as I can tell (from running actual tests) Postgres will not use a multi-column index when the SELECT is constraining on only one o

[GENERAL] CURRENT_TIMESTAMP wierd behaviour

2006-08-10 Thread Andy Foster
Hi all I have created the following simple table create table NTE_NOTES ( nte_id int unique not null, nte_text text not null, nte_last_updated timestamp not null, constraint nte_pk primary key (nte_id)); If I execute the following sql as a single transaction in t

Re: [GENERAL] CURRENT_TIMESTAMP wierd behaviour

2006-08-10 Thread Scott Marlowe
On Thu, 2006-08-10 at 09:37, Andy Foster wrote: > Hi all > > I have created the following simple table > > create table NTE_NOTES ( > nte_id int unique not null, > nte_text text not null, > nte_last_updated timestamp not null, > constraint nte_pk primary key (nte_id)); >

Re: [GENERAL] Tuning to speed select

2006-08-10 Thread Michael Fuhr
On Thu, Aug 10, 2006 at 11:00:00AM -0400, Tom Laudeman wrote: > As far as I can tell (from running actual tests) Postgres will not use a > multi-column index when the SELECT is constraining on only one of the > columns in the index. Excerpt from the 8.1 Release Notes: * Allow nonconsecutive i

Re: [GENERAL] Tuning to speed select

2006-08-10 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > Excerpt from the 8.1 Release Notes: > * Allow nonconsecutive index columns to be used in a multicolumn > index (Tom) > For example, this allows an index on columns a,b,c to be used in > a query with WHERE a = 4 and c = 10. > If you're quer

Re: [GENERAL] Connection string

2006-08-10 Thread Harpreet Dhaliwal
This is a simple code snippet that i've written to check if i can connect to the postgres database server residing at IP 192.168.0.123. DB name is xyz Also, user account jsb has the access to the database xyz. #include   EXEC SQL INCLUDE

[GENERAL] No comerr32.dll and krb5_32.dll on WIN32 build

2006-08-10 Thread DEV
Hello all,   Okay I have gotten the Win32 to “build” with out any errors but I am working with libpqxx and it says I need th comerr32.dll and krb5_32.dll from the src\bin of postgresql and they are not there?   What do I need to do?    

Re: [GENERAL] Setting Slony on a large production database

2006-08-10 Thread Chris Browne
[EMAIL PROTECTED] writes: > I have to set up a replication database from a large production > database on a new server, using Slony. > > As the tables I have to replicate have several million rows, I tried to > dump the entire database from the master and restore it as a slave > database before set

[GENERAL] Setting Slony on a large production database

2006-08-10 Thread Nicolas . PAYART
Hi, I have to set up a replication database from a large production database on a new server, using Slony. As the tables I have to replicate have several million rows, I tried to dump the entire database from the master and restore it as a slave database before setting up Slony (in a developpemen

Re: [GENERAL] How to do auto numbering on INT column

2006-08-10 Thread Chris Mair
> HI > I have a simple table created using PGAdmin III. How do i do a auto > numbering on a column SYMBOL_ID? > My table is > CREATE TABLE "SYMBOL" > ( > "SYMBOL_ID" int4 NOT NULL, > "SYMBOL2EXCHANGE" int2 NOT NULL, > "SYMBOL_ALIAS" text[], > "RELATED_SYMBOLS_OTHER_EXCHANGES" int8[], > "

[GENERAL] How to do auto numbering on INT column

2006-08-10 Thread Junkone
HI I have a simple table created using PGAdmin III. How do i do a auto numbering on a column SYMBOL_ID? My table is CREATE TABLE "SYMBOL" ( "SYMBOL_ID" int4 NOT NULL, "SYMBOL2EXCHANGE" int2 NOT NULL, "SYMBOL_ALIAS" text[], "RELATED_SYMBOLS_OTHER_EXCHANGES" int8[], "SYMBOL_NAME" text, "C

[GENERAL] High available solution

2006-08-10 Thread gpap
HiIs there a way with postgres to implement a high available solution ?The main characteristic is availability, but load balancing will be another interesting characteristic.Thanksgertrude iFRANCE exprimez-vous !

Re: [GENERAL] High available solution

2006-08-10 Thread Shoaib Mir
You can use a combination of Linux HA (for availability) + pgpool (for load balancing)Thanks,-- Shoaib MirEnterpriseDB (www.enterprisedb.com) On 8/10/06, gpap @ ifrance. com <[EMAIL PROTECTED]> wrote: HiIs there a way with postgres to implement a high available solution ?The main characteristic is

[GENERAL] my first procedure

2006-08-10 Thread marcelo Cortez
folks i´ts is my first procedure/function the pgadmin show 10 secs in execute it any pointer be apreciated CREATE OR REPLACE FUNCTION fs_getstring() RETURNS TEXT AS ' DECLARE DECLARE curs1 CURSOR FOR select id_reparticion ::varchar || chr(1) || codigo_reparticion ::varch

Re: [GENERAL] Connection string

2006-08-10 Thread Michael Fuhr
On Thu, Aug 10, 2006 at 11:57:14AM -0400, Harpreet Dhaliwal wrote: > EXEC SQL CONNECT TO 'tcp:postgresql://192.168.0.123/xyz' USER jsb It should work if you omit the quotes or use a variable reference. Try this: EXEC SQL CONNECT TO tcp:postgresql://192.168.0.123/xyz USER jsb; or EXEC S

Re: [GENERAL] my first procedure

2006-08-10 Thread Merlin Moncure
On 8/10/06, marcelo Cortez <[EMAIL PROTECTED]> wrote: folks i´ts is my first procedure/function the pgadmin show 10 secs in execute it any pointer be apreciated use dollar quote (pg 8.0 and up): create or replace function fs_getstring() RETURNS TEXT as $$ [...] $$ language plpgsql; C

[GENERAL] How to use the full text index feature on PostgreSQL 8.x

2006-08-10 Thread aBBISh
Hello everyone How to use the full text index feature to search a lot of text on PostgreSQL 8.x? thank you~! ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] How to use the full text index feature on PostgreSQL

2006-08-10 Thread Chris
aBBISh wrote: Hello everyone How to use the full text index feature to search a lot of text on PostgreSQL 8.x? You need to install & setup tsearch2. I have a small article about how to do that here: http://www.designmagick.com/article/27/ -- Postgresql & php tutorials http://www.designmagic

Re: [GENERAL] How to use the full text index feature on PostgreSQL

2006-08-10 Thread aBBISh
Chris 写道: aBBISh wrote: Hello everyone How to use the full text index feature to search a lot of text on PostgreSQL 8.x? You need to install & setup tsearch2. I have a small article about how to do that here: http://www.designmagick.com/article/27/ That article so good,thank you. Can yo

Re: [GENERAL] How to use the full text index feature on PostgreSQL

2006-08-10 Thread Chris
aBBISh wrote: Chris 写道: aBBISh wrote: Hello everyone How to use the full text index feature to search a lot of text on PostgreSQL 8.x? You need to install & setup tsearch2. I have a small article about how to do that here: http://www.designmagick.com/article/27/ That article so good,tha