Re: [GENERAL] Getting source code for database objects

2008-07-09 Thread Artacus
Easier would be just uing pg_dump -s >schema.sql to get all schema objects so you could check them into subversion. If you want only specific objects, pg_dump -l >listofobjects, then edit this list as you like and use pg_dump -L listofobjects >someobjects.sql The -l and -L options are not reco

Re: [GENERAL] Feature: FOR UPDATE SKIP LOCKED

2008-07-09 Thread Csaba Nagy
On Wed, 2008-07-09 at 00:48 -0400, Tom Lane wrote: > "Jonathan Bond-Caron" <[EMAIL PROTECTED]> writes: > > It would be quite useful to implement a database queue. Although FOR UPDATE > > NOWAIT and trying again can work as well as other techniques, > > > just skipping over the locks has its advan

Re: [GENERAL] plpgsql - or operator?

2008-07-09 Thread Richard Huxton
MadHatter wrote: If I have an expression (a or b)a where a=TRUE and b=FALSE, why is b evaluated? Any true operand before an or operator means the entire expression is true . There is no "before" - PG makes no guarantee about evaluation order. Don't forget a,b might well be subqueries and you

Re: [GENERAL] Feature: FOR UPDATE SKIP LOCKED

2008-07-09 Thread Craig Ringer
Csaba Nagy wrote: > On Wed, 2008-07-09 at 00:48 -0400, Tom Lane wrote: >> "Jonathan Bond-Caron" <[EMAIL PROTECTED]> writes: >>> It would be quite useful to implement a database queue. Although FOR UPDATE >>> NOWAIT and trying again can work as well as other techniques, >>> just skipping over the l

Re: [GENERAL] Getting source code for database objects

2008-07-09 Thread Richard Huxton
Artacus wrote: Easier would be just uing pg_dump -s >schema.sql to get all schema objects so you could check them into subversion. If you want only specific objects, pg_dump -l >listofobjects, then edit this list as you like and use pg_dump -L listofobjects >someobjects.sql The -l and -L opt

Re: [GENERAL] Feature: FOR UPDATE SKIP LOCKED

2008-07-09 Thread Csaba Nagy
On Wed, 2008-07-09 at 16:23 +0800, Craig Ringer wrote: > Especially if it returned an updated row count or supported the > RETURNING clause, so you could find out after the fact what was or > wasn't done. Well, it is supposed to be used as "SELECT ... FOR UPDATE SKIP LOCKED", so you can in fact pu

[GENERAL] SELECT Query returns empty

2008-07-09 Thread Bright D.L.
Hi All, I would really appreciate if any one can help me out on the problem that I am facing with PostgreSQL. The following is the system (Dell laptop) configuration: Windows XP - SP2, Intel Core 2Duo, 2GB RAM PostgreSQL v 8.3.3 The scenario: There are t

Re: [GENERAL] Feature: FOR UPDATE SKIP LOCKED

2008-07-09 Thread Craig Ringer
Csaba Nagy wrote: > On Wed, 2008-07-09 at 16:23 +0800, Craig Ringer wrote: >> Especially if it returned an updated row count or supported the >> RETURNING clause, so you could find out after the fact what was or >> wasn't done. > > Well, it is supposed to be used as "SELECT ... FOR UPDATE SKIP LOC

Re: [GENERAL] SELECT Query returns empty

2008-07-09 Thread Thomas Markus
hi, have a look at transaction isolation in docs /tm begin:vcard fn:Thomas Markus n:Markus;Thomas org:proventis GmbH adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany email;internet:[EMAIL PROTECTED] tel;work:+49 30 29 36 399 22 x-mozilla-html:FALSE url:http://www.proventis.net version:2.1 end

Re: [GENERAL] SELECT Query returns empty

2008-07-09 Thread A. Kretschmer
am Wed, dem 09.07.2008, um 16:32:11 +0800 mailte Bright D.L. folgendes: > The scenario: > There are two separate processes ? one (P1) inserting (not > updating) data to a table at a high rate (around one record in 10ms) and > another (P2) selecting the data from the same table for furt

Re: [GENERAL] SELECT Query returns empty

2008-07-09 Thread Craig Ringer
Bright D.L. wrote: > I would like to know why P1 can retrieve the data from the table while > P2 can't. At a guess: transactional visibility. P1 will have not yet committed its transaction, so the data isn't visible to P2 yet. Remember, PostgreSQL defaults to the READ COMMITTED isolation level an

Re: [GENERAL] Hi there, new here and have question

2008-07-09 Thread Asche
CREATE OR REPLACE FUNCTION listofemployeebasedondepartment(_id_dept int) RETURNS SETOF record AS $BODY$ DECLARE empdata record; BEGIN RETURN QUERY SELECT e.*, d.department_name FROM employee e, dept d WHERE e.id_dept = d.id AND e.id_dept = _id_dept; RETURN; END; $BODY$ LANGUAGE 'plpg

Re: [GENERAL] Getting source code for database objects

2008-07-09 Thread Tino Wildenhain
Richard Huxton wrote: Artacus wrote: Easier would be just uing pg_dump -s >schema.sql to get all schema objects so you could check them into subversion. If you want only specific objects, pg_dump -l >listofobjects, then edit this list as you like and use pg_dump -L listofobjects >someobjects.

[GENERAL] MSSQL to PostgreSQL

2008-07-09 Thread Iv Ray
Hello, what is the current status of the MSSQL to PostgreSQL tools/tips? Google returns results as old as 2001... The MSSQL database in question has only tables, no stored procedures, etc. Thanks, Iv -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

[GENERAL] rollback

2008-07-09 Thread Adrian Moisey
Hi I would like to be able to "mark" a point in my postgres database. After that I want to change a few things and "rollback" to that point. Does postgres support such a thing? Is it possible for me to do this? -- Adrian Moisey Systems Administrator | CareerJunction | Your Future Starts Here

Re: [GENERAL] rollback

2008-07-09 Thread A. Kretschmer
am Wed, dem 09.07.2008, um 15:38:52 +0200 mailte Adrian Moisey folgendes: > Hi > > I would like to be able to "mark" a point in my postgres database. > After that I want to change a few things and "rollback" to that point. > Does postgres support such a thing? Is it possible for me to do this?

Re: [GENERAL] rollback

2008-07-09 Thread Richard Broersma
On Wed, Jul 9, 2008 at 6:38 AM, Adrian Moisey <[EMAIL PROTECTED]> wrote: > I would like to be able to "mark" a point in my postgres database. After > that I want to change a few things and "rollback" to that point. Does > postgres support such a thing? Is it possible for me to do this? Sure. Che

Re: [GENERAL] rollback

2008-07-09 Thread Martijn van Oosterhout
On Wed, Jul 09, 2008 at 03:38:52PM +0200, Adrian Moisey wrote: > Hi > > I would like to be able to "mark" a point in my postgres database. > After that I want to change a few things and "rollback" to that point. > Does postgres support such a thing? Is it possible for me to do this? Well, tran

Re: [GENERAL] rollback

2008-07-09 Thread Adrian Moisey
Hi I would like to be able to "mark" a point in my postgres database. After that I want to change a few things and "rollback" to that point. Does postgres support such a thing? Is it possible for me to do this? Well, transactions do that. If you want to do this inside a transaction, the term

Re: [GENERAL] rollback

2008-07-09 Thread A. Kretschmer
am Wed, dem 09.07.2008, um 15:59:00 +0200 mailte Adrian Moisey folgendes: > Hi > > >>I would like to be able to "mark" a point in my postgres database. > >>After that I want to change a few things and "rollback" to that point. > >>Does postgres support such a thing? Is it possible for me to do

Re: [GENERAL] rollback

2008-07-09 Thread Adrian Moisey
Hi I would like to be able to "mark" a point in my postgres database. After that I want to change a few things and "rollback" to that point. Does postgres support such a thing? Is it possible for me to do this? Well, transactions do that. If you want to do this inside a transaction, the term

Re: [GENERAL] rollback

2008-07-09 Thread Merlin Moncure
On Wed, Jul 9, 2008 at 10:32 AM, Adrian Moisey <[EMAIL PROTECTED]> wrote: > Hi > > I would like to be able to "mark" a point in my postgres database. > After that I want to change a few things and "rollback" to that point. > Does > postgres support such a thing? Is it possible for

[GENERAL] Table X its full, what can i do now?

2008-07-09 Thread x asasaxax
Hi everyone, I have the following sql script: CREATE SEQUENCE "public"."teste_seq" INCREMENT 1 MINVALUE 1 MAXVALUE 32767 START 1 CACHE 1 CYCLE; CREATE TABLE "public"."teste" ( "id" SMALLINT DEFAULT nextval('teste_seq'::regclass) NOT NULL, CONSTRAINT "id_pk" PRIMARY KEY("id") )

Re: [GENERAL] rollback

2008-07-09 Thread Madison Kelly
Adrian Moisey wrote: Hi I would like to be able to "mark" a point in my postgres database. After that I want to change a few things and "rollback" to that point. Does postgres support such a thing? Is it possible for me to do this? A crude way of doing it, which I've done in the past on t

Re: [GENERAL] Table X its full, what can i do now?

2008-07-09 Thread Dan Myers
x asasaxax wrote: CREATE SEQUENCE "public"."teste_seq" INCREMENT 1 MINVALUE 1 MAXVALUE 32767 START 1 CACHE 1 CYCLE; What can i do to be able to continue inserting rows on this table? Thanks a lot. Make the max value of your sequence larger. A lot larger. - Dan "Heron" Mye

Re: [GENERAL] Table X its full, what can i do now?

2008-07-09 Thread Rodrigo Gonzalez
x asasaxax wrote: > Hi everyone, > > >I have the following sql script: > > CREATE SEQUENCE "public"."teste_seq" >INCREMENT 1 MINVALUE 1 >MAXVALUE 32767 START 1 >CACHE 1 CYCLE; > > CREATE TABLE "public"."teste" ( > "id" SMALLINT DEFAULT nextval('teste_seq'::regclass) NOT NULL

Re: [GENERAL] rollback

2008-07-09 Thread Christophe
On Jul 9, 2008, at 6:38 AM, Adrian Moisey wrote: I would like to be able to "mark" a point in my postgres database. After that I want to change a few things and "rollback" to that point. Does postgres support such a thing? Is it possible for me to do this? This seems to be exactly what tr

Re: [GENERAL] MSSQL to PostgreSQL

2008-07-09 Thread Gwyneth Morrison
Iv Ray wrote: Hello, what is the current status of the MSSQL to PostgreSQL tools/tips? Google returns results as old as 2001... The MSSQL database in question has only tables, no stored procedures, etc. Thanks, Iv Hi Ray, I have something that does this. I am currently awaiting project

[GENERAL] Inaccurate row count estimation

2008-07-09 Thread Vyacheslav Kalinin
Hello, Consider two tables: contacts: cid integer primary key, pid integer not null, cpid integer ... pinfo: pid integer, ... pinfo is a parent table with two partitions pinfo_p00 and pinfo_p01, all three have primary keys on pid and partitions have proper constraints that guarantee

[GENERAL] pgmemcache status

2008-07-09 Thread Marc Munro
Hope this is the right place to ask. Apologies if not. Is pgmemcache still being actively supported/developed? I have experienced a database crash with postgres 8.3.3 and pgmemcache 1.2beta1 Doing select * from pg_settings (with shared_preload_libraries defined and no custom variable definition

[GENERAL] information related to blobs

2008-07-09 Thread aravind chandu
Hello,   Blobs stores large amount can you please tell me what is the limit i.e hw many kb of data can it store ? say 4000k like that. For suppose if a 4000kb data can be stored using blob and the data stored in blob is 3600k what about the remaining data? will it allocates a

[GENERAL] regexp help

2008-07-09 Thread Garry Saddington
I have the following simple regular expression: "SELECT substring(addressline1 from '(^[0-9]+)') from addresses" How could I find non-matches of this same pattern? regards Garry -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://ww

Re: [GENERAL] array sort for varchar arrays?

2008-07-09 Thread Matthew Dennis
On Wed, Jul 9, 2008 at 12:28 AM, Pavel Stehule <[EMAIL PROTECTED]> wrote: > 2008/7/8 Matthew Dennis <[EMAIL PROTECTED]>: > > I'm likely overlooking something, but I can't seem to find a function to > > sort a varchar array. Something like "select sort('{y,z,x}'::varchar[])" > => > > {'x','y','z'}

Re: [GENERAL] Table X its full, what can i do now?

2008-07-09 Thread Scott Marlowe
Is there some business logic here for the cycling sequence / ID? On Wed, Jul 9, 2008 at 9:00 AM, x asasaxax <[EMAIL PROTECTED]> wrote: > Hi everyone, > > >I have the following sql script: > > CREATE SEQUENCE "public"."teste_seq" >INCREMENT 1 MINVALUE 1 >MAXVALUE 32767 START 1 >CA

Re: [GENERAL] regexp help

2008-07-09 Thread Said Ramirez
You can probably use [^0-9] -Said Garry Saddington wrote: I have the following simple regular expression: "SELECT substring(addressline1 from '(^[0-9]+)') from addresses" How could I find non-matches of this same pattern? regards Garry -- Sent via pgsql-general mailing list (pgsql-general@po

Re: [GENERAL] regexp help

2008-07-09 Thread Charles Simard
|> -Original Message- |> From: [EMAIL PROTECTED] |> [mailto:[EMAIL PROTECTED] Behalf Of |> Garry Saddington |> Sent: 9 juillet 2008 15:31 |> To: pgsql-general@postgresql.org |> Subject: [GENERAL] regexp help |> |> |> I have the following simple regular expression: |> |> "SELECT substrin

[GENERAL] manual Installation for thread safety

2008-07-09 Thread [EMAIL PROTECTED]
In order to use the --enable-thread-safety build switch I need to do a manual build... UNLESS there is a way of doing this from the RPM command line, which I have not been able to find. Where do I get 8.2.5-1? This version came with my installation of Fedora 8 so I presume it is the version I sho

Re: [GENERAL] rollback

2008-07-09 Thread Simon Riggs
On Wed, 2008-07-09 at 15:38 +0200, Adrian Moisey wrote: > I would like to be able to "mark" a point in my postgres database. > After that I want to change a few things and "rollback" to that > point. > Does postgres support such a thing? Is it possible for me to do this? * Transactions ;-) *

Re: [GENERAL] MSSQL to PostgreSQL

2008-07-09 Thread Iv Ray
Hi Ray, I have something that does this. I am currently awaiting project approval on pgfoundry. It does tables, views, and stored procedures. I have tested it on 450,000 lines of mssql code including 400 tables and 3700 stored procedures, although it is a work in progress. I applied last wee

Re: [GENERAL] pgmemcache status

2008-07-09 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > Is pgmemcache still being actively supported/developed? I have > experienced a database crash with postgres 8.3.3 and pgmemcache 1.2beta1 Yes and no. I just joined up, and hope to be submitting some patches to it soon, as well as push to get

Re: [GENERAL] MSSQL to PostgreSQL

2008-07-09 Thread Gwyneth Morrison
Iv Ray wrote: Hi Ray, I have something that does this. I am currently awaiting project approval on pgfoundry. It does tables, views, and stored procedures. I have tested it on 450,000 lines of mssql code including 400 tables and 3700 stored procedures, although it is a work in progress. I a

[GENERAL] Default UUID in Postgres

2008-07-09 Thread Swaminathan Saikumar
Hello, I created a Postgres table with a UUID. I want the UUID to be populated by default. Sample table: CREATE TABLE "t" ( token uuid NOT NULL, CONSTRAINT unique_token UNIQUE (token) ); I tried out this post: http://archives.postgresql.org/pgsql-general/2006-08/msg01452.php CREATE TABLE t (

Re: [GENERAL] MSSQL to PostgreSQL

2008-07-09 Thread Iv Ray
Gwyneth Morrison wrote: Ray, I think we tried that and I think it works but not for us. It may work for you. MS wants to copy all the tables over with exactly the same names including [dbo]. and so on. When it doesn't find an exact match, it wants to create the table. This may be ok for you

Re: [GENERAL] Default UUID in Postgres

2008-07-09 Thread Christophe
On Jul 9, 2008, at 4:32 PM, Swaminathan Saikumar wrote: Hello, I created a Postgres table with a UUID. I want the UUID to be populated by default. PostgreSQL doesn't have built-in functions for generating UUIDs, but there is a module in contrib that will do so: http://www.postg

Re: [GENERAL] manual Installation for thread safety

2008-07-09 Thread Tom Lane
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > In order to use the --enable-thread-safety build switch I need to do a > manual build... UNLESS there is a way of doing this from the RPM command > line, which I have not been able to find. Uh ... whose RPM are you using? All the PG RPMs I know of

[GENERAL] Making a RPM installer

2008-07-09 Thread Jamie Deppeler
Hi, Not sure if this the correct place to post this issue but hopefully someone can help. I am building a rpm for RHEL 5 The rpm contains a compiled version for postgresql-8.3.3 and tomcat 6 and java 1.6. When i try to install the rpm on blank test system i get the following depend

Re: [GENERAL] Making a RPM installer

2008-07-09 Thread Joshua D. Drake
On Thu, 2008-07-10 at 10:28 +1000, Jamie Deppeler wrote: > Hi, > > Not sure if this the correct place to post this issue but hopefully > someone can help. Any reason why you just wouldn't use: http://www.pgsqlrpms.org and http://www.jpackage.org/ Sincerely, Joshua D. Drake > > I am buil

Re: [GENERAL] Making a RPM installer

2008-07-09 Thread Jamie Deppeler
There is a few reason why I am making this installer 1. Need to make a installer that just uses one rpm file 2. It needs to come with a prebuild database 3. Custom changes have been made to tomcat configuration Joshua D. Drake wrote: On Thu, 2008-07-10 at 10:28 +1000, Jamie Deppeler wrote:

Re: [GENERAL] Making a RPM installer

2008-07-09 Thread Joshua D. Drake
On Thu, 2008-07-10 at 11:02 +1000, Jamie Deppeler wrote: > There is a few reason why I am making this installer > > 1. Need to make a installer that just uses one rpm file > 2. It needs to come with a prebuild database > 3. Custom changes have been made to tomcat configuration Fair enough :) bu

Re: [GENERAL] rollback

2008-07-09 Thread Klint Gore
Adrian Moisey wrote: Hi I would like to be able to "mark" a point in my postgres database. After that I want to change a few things and "rollback" to that point. Does postgres support such a thing? Is it possible for me to do this? >>> Well, transactions do that. If you want t

Re: [GENERAL] Making a RPM installer

2008-07-09 Thread Tom Lane
Jamie Deppeler <[EMAIL PROTECTED]> writes: > I am building a rpm for RHEL 5 > The rpm contains a compiled version for postgresql-8.3.3 and tomcat > 6 and java 1.6. > When i try to install the rpm on blank test system i get the > following dependence issues > libodbc.so is neede

Re: [GENERAL] SELECT Query returns empty

2008-07-09 Thread Bright D.L.
Thank you Craig, >At a guess: transactional visibility. P1 will have not yet committed its >transaction, so the data isn't visible to P2 yet. Remember, PostgreSQL >defaults to the READ COMMITTED isolation level and does not offer READ >UNCOMMITTED for those rare situations where you might want it.

Re: [GENERAL] SELECT Query returns empty

2008-07-09 Thread Bright D.L.
>> The scenario: >> There are two separate processes ? one (P1) inserting (not >> updating) data to a table at a high rate (around one record in 10ms) and >> another (P2) selecting the data from the same table for further >>processing. P1 >> and P2 use separate connection to the Databas

Re: [GENERAL] Making a RPM installer

2008-07-09 Thread Jamie Deppeler
Tried to use "ldd" but i am getting not a dynamic executable Tom Lane wrote: Jamie Deppeler <[EMAIL PROTECTED]> writes: I am building a rpm for RHEL 5 The rpm contains a compiled version for postgresql-8.3.3 and tomcat 6 and java 1.6. When i try to install the rpm on b

Re: [GENERAL] SELECT Query returns empty

2008-07-09 Thread Bright D.L.
>hi, >have a look at transaction isolation in docs Thanks TM. I checked the isolation level of the DB and it is "read committed". May be I will change it to 'Serializable' and check whether that helps. >/tm -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] SELECT Query returns empty

2008-07-09 Thread Klint Gore
Bright D.L. wrote: Processes P1 and P2 are executables developed in VC++. These are the steps performed by P1 before sending the TCP packet (which acts as a trigger) to P2. 1) Create an insertion query 2) Execute the query 3) Execute a 'Commit' command 4) Repeat 2 and 3 how many ever times neede

[GENERAL] Array as parameter for stored procedure

2008-07-09 Thread Hendra
Hi, I'm learning some 3-tier concept here and very interested with postgresql stored-procedure But since I 'm the type who learn from example, I'm having some difficulties here I want to know how postgresql use array as parameter for stored procedure, I imagine a case when we want to save selli

Re: [GENERAL] SELECT Query returns empty

2008-07-09 Thread Bright D.L.
>> Processes P1 and P2 are executables developed in VC++. These are the >> steps performed by P1 before sending the TCP packet (which acts as a >> trigger) to P2. >> >> 1) Create an insertion query >> 2) Execute the query >> 3) Execute a 'Commit' command > 4) Repeat 2 and 3 how many ever times need

Re: [GENERAL] Inaccurate row count estimation

2008-07-09 Thread Tom Lane
"Vyacheslav Kalinin" <[EMAIL PROTECTED]> writes: > How come that outermost join expects 1515 rows given the row estimations of > the inner and outer nested loop's parts? I couldn't reproduce such a problem. What PG version are you running? regards, tom lane -- Sent via

Re: [GENERAL] SELECT Query returns empty

2008-07-09 Thread Tom Lane
"Bright D.L." <[EMAIL PROTECTED]> writes: > P1 did commit its insertion and verified it by successfully querying the > last inserted data, before sending the TCP packet - the trigger - to P2 The fact that P1 can see data it inserted is no proof at all that it's committed its transaction. I think

Re: [GENERAL] array sort for varchar arrays?

2008-07-09 Thread Pavel Stehule
2008/7/9 Matthew Dennis <[EMAIL PROTECTED]>: > On Wed, Jul 9, 2008 at 12:28 AM, Pavel Stehule <[EMAIL PROTECTED]> > wrote: >> >> 2008/7/8 Matthew Dennis <[EMAIL PROTECTED]>: >> > I'm likely overlooking something, but I can't seem to find a function to >> > sort a varchar array. Something like "sel

Re: [GENERAL] Making a RPM installer

2008-07-09 Thread Devrim GÜNDÜZ
On Thu, 2008-07-10 at 11:02 +1000, Jamie Deppeler wrote: > There is a few reason why I am making this installer > > 1. Need to make a installer that just uses one rpm file "Need" or "want"? I'd not maintain one RPM file that contains Tomcat5, Java and PostgreSQL -- it would be PITA, imho. But of

Re: [GENERAL] SELECT Query returns empty

2008-07-09 Thread Klint Gore
Bright D.L. wrote: >Once step 6 completes, can psql see the data? Yes, P1 makes sure and is able to see the data before sending Packet to P2. Not P1, but psql. If you can see the data from psql, then your problem has to be in P2. If you can't see the data from psql, then P1 is the probl

Re: [GENERAL] Making a RPM installer

2008-07-09 Thread Devrim GÜNDÜZ
On Thu, 2008-07-10 at 10:28 +1000, Jamie Deppeler wrote: > When i try to install the rpm on blank test system i get the > following dependence issues > > libodbc.so is needed > libodbcinst.so is needed These both come from unixODBC package -- install that package first. --

Re: [GENERAL] manual Installation for thread safety

2008-07-09 Thread Devrim GÜNDÜZ
On Wed, 2008-07-09 at 12:51 -0700, [EMAIL PROTECTED] wrote: > In order to use the --enable-thread-safety build switch I need to do a > manual build... UNLESS there is a way of doing this from the RPM > command line, which I have not been able to find. Did you install redhat-rpm-config RPM? -HTH.

Re: [GENERAL] information related to blobs

2008-07-09 Thread Albe Laurenz
aravind chandu wrote: > Blobs stores large amount can you please tell me > what is the limit i.e hw many kb of data can it store ? say > 4000k like that. > > For suppose if a 4000kb data can be stored using > blob and the data stored in blob is 3600k what about the > remaini

Re: [GENERAL] Array as parameter for stored procedure

2008-07-09 Thread Pavel Stehule
Hello a) create or replace function iterate(a int[]) returns void as $$ begin for i in array_lower(a,1)..arry_upper(a,1) loop raise notice '%', a[i]; end loop; end; $$ language plpgsql strict; look to: http://www.pgsql.cz/index.php/PL/pgSQL_%28en%29 or http://www.postgresql.org/docs/8.3/i

Re: [GENERAL] Inaccurate row count estimation

2008-07-09 Thread Vyacheslav Kalinin
This is 8.3.0. Here is the reproduce code: create table contacts ( cid integer primary key, pid integer not null, cpid integer ); create index ix_contacts_pid on contacts (pid); create index ix_contacts_cpid on contacts (cpid); create table pinfo ( pid integer, constraint pk_pinfo pri