[GENERAL] [PGSQL v8.2.5] Similar queries behave differently

2007-10-25 Thread Reg Me Please
Hi all. On the very same database and session I have two different (but similar) queries behaving in a very different way as far as timings. This is the first one: prove=# explain analyze select d.* from t_vcol natural join v_dati_attuali d natural join tt_elem where vtab_id='TEST';

Re: [GENERAL] [PGSQL v8.2.5] Similar queries behave differently

2007-10-25 Thread Reg Me Please
Il Thursday 25 October 2007 13:20:40 Gregory Stark ha scritto: > "Gregory Stark" <[EMAIL PROTECTED]> writes: > > "Reg Me Please" <[EMAIL PROTECTED]> writes: > >>-> Seq Scan on tt_elem (cost=0.00..29.40 rows=1940 > >>

Re: [GENERAL] Crosstab Problems

2007-10-25 Thread Reg Me Please
Il Thursday 25 October 2007 16:29:33 Scott Marlowe ha scritto: > On 10/24/07, Tom Lane <[EMAIL PROTECTED]> wrote: > > Joe Conway <[EMAIL PROTECTED]> writes: > > > Tom Lane wrote: > > >> 1. Treat NULL rowid as a category in its own right. This would > > >> conform with the behavior of GROUP BY and

Re: [GENERAL] subversion support?

2007-10-25 Thread Reg Me Please
Ever tried Druid? http://druid.sourceforge.net/ Il Thursday 25 October 2007 18:02:51 Tino Wildenhain ha scritto: > Hi, > > Roberts, Jon schrieb: > > I could use psql instead of pgAdmin then which isn't what I want. > > > > Having used Quest software SQL Navigator since 97 for Oracle and then > >

Re: [GENERAL] Query_time SQL as a function w/o creating a new type

2007-10-25 Thread Reg Me Please
You could try this: CREATE OR REPLACE FUNCTION foo( out procpid integer, out client_addr inet, out query_time interval, out current_query text ) RETURNS SETOF RECORD AS $BODY$ ... $BODY$ LANGUAGE PLPGSQL VOLATILE; (Thanks to Joen Conway for showing this in tablefunc!) Il Friday 26 October 200

[GENERAL] How to ALTER a TABLE to change the primary key?

2007-10-26 Thread Reg Me Please
Hi all. I'd need to modify the primary key definition in an already populated table. How can I do it? Thanks. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] INDEX and JOINs

2007-10-26 Thread Reg Me Please
Hi all. I have a setup like this: CREATE TABLE T_FIELDS ( TABL_ID TEXT NOT NULL, COLU_ID TEXT NOT NULL, FIEL_ID TEXT PRIMARY KEY, UNIQUE( TABL_ID,COLU_ID ) ); -- < 200 ROWS CREATE TABLE T_DATA ( ITEM_ID INT8 NOT NULL, FIEL_ID TEXT NOT NULL REFERENCES T_FIELDS, DATA_T TEXT NOT NULL,

Re: [GENERAL] INDEX and JOINs

2007-10-26 Thread Reg Me Please
Il Friday 26 October 2007 13:05:10 Martijn van Oosterhout ha scritto: > On Fri, Oct 26, 2007 at 12:34:06PM +0200, Reg Me Please wrote: > > it's very fast (of course!). But when I run: > > > > SELECT * FROM T_DATA NATURAL JOIN T_FIELDS WHERE TABL_ID='TABL'; >

Re: [GENERAL] INDEX and JOINs

2007-10-26 Thread Reg Me Please
Il Friday 26 October 2007 13:56:20 Martijn van Oosterhout ha scritto: > On Fri, Oct 26, 2007 at 01:10:42PM +0200, Reg Me Please wrote: > > prove=# explain analyze SELECT * from t_dati natural left join t_campi > > where

Re: [GENERAL] INDEX and JOINs

2007-10-26 Thread Reg Me Please
Il Friday 26 October 2007 15:18:04 Tom Lane ha scritto: > Reg Me Please <[EMAIL PROTECTED]> writes: > >>> (cost=3.95..382140.91 rows=274709 width=91) (actual > >>> time=1.929..57713.305 rows=92 loops=1) > >>> Hash Cond: (t_dati.camp_id = t_campi.camp_

Re: [GENERAL] INDEX and JOINs

2007-10-27 Thread Reg Me Please
Il Saturday 27 October 2007 08:51:09 Andreas Kretschmer ha scritto: > Reg Me Please <[EMAIL PROTECTED]> schrieb: > > How can I "Increasing the statistics target for the larger table"? > > I'ìm sorry for asking, but I'm not that deep into RDBMS. >

Re: [GENERAL] [PGSQL v8.2.5] Similar queries behave differently

2007-10-29 Thread Reg Me Please
? Many thanks again. Il Thursday 25 October 2007 10:17:23 Reg Me Please ha scritto: > Hi all. > On the very same database and session I have two different (but similar) > queries behaving in a very different way as far as timings. > > This is the first one: > > prove=# explain

Re: [GENERAL]

2007-10-30 Thread Reg Me Please
t; > I was wonderring why it is not included by default? Or have I missed out > > something in the configuration! > > It's included by default, just not enabled by default. Try "create > language plpgsql" as administrator. > > > Also, how to do a better text

Re: [GENERAL] Join between tables of two or more databases

2007-10-31 Thread Reg Me Please
ases on the same server? > > > ---(end of broadcast)--- > TIP 6: explain analyze is your friend As far as they are "different databases", you cannot do it at the moment. It doesn't matter whether they are local or not. T

Re: [GENERAL] Securing stored procedures and triggers

2007-10-31 Thread Reg Me Please
7;m not sure about that feature being supported by PGSQL. Don't think so, anyway. But if your competitor needs to steal your code in order to compete, then you are ahead of him: you think, he copies. -- Reg me Please ---(end of broadcast)---

Re: [GENERAL] Securing stored procedures and triggers

2007-10-31 Thread Reg Me Please
; -Doug > > ---(end of broadcast)--- > TIP 1: if posting/reading through Usenet, please send an appropriate >subscribe-nomail command to [EMAIL PROTECTED] so that your >message can get through to the mailing list cleanly

[GENERAL] COPY ... FROM and index usage

2007-11-04 Thread Reg Me Please
Hi all. I'd like to know whether the indexes on a table are updated or not during a "COPY ... FROM" request. That is, should I drop all indexes during a "COPY ... FROM" in order to gain the maximum speed to load data? Thanks. -- Reg me Please ---

Re: [GENERAL] COPY ... FROM and index usage

2007-11-04 Thread Reg Me Please
Il Sunday 04 November 2007 14:59:10 Josh Tolley ha scritto: > On 11/4/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > Hi all. > > > > I'd like to know whether the indexes on a table are updated or not during > > a "COPY ... FROM" request. > >

Re: [GENERAL] COPY ... FROM and index usage

2007-11-04 Thread Reg Me Please
Il Sunday 04 November 2007 16:21:41 Erik Jones ha scritto: > On Nov 4, 2007, at 9:15 AM, Reg Me Please wrote: > > Il Sunday 04 November 2007 14:59:10 Josh Tolley ha scritto: > >> On 11/4/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > >>> Hi all. > >>&g

[GENERAL] Locale and indexes: howto?

2007-11-05 Thread Reg Me Please
t more complex than I thought. I already use the C language collation schema, very useful in directory listings. Should I install PGSQL with also the LC_CTYPE=C? Or what? Many thanks in advance. -- Reg me Please ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Locale and indexes: howto?

2007-11-06 Thread Reg Me Please
Il Monday 05 November 2007 21:27:27 Reg Me Please ha scritto: > HI all. > > While reading chapter 11 of v8.2 I've encountered this sentence: > > However, if your server does not use the C locale you will need to create > the index with a special operator class to suppor

[GENERAL] How to create primary key

2007-11-06 Thread Reg Me Please
Hi all. What'd be the syntax to create a primary key on an already build table? Thanks. -- Reg me Please ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] generic crosstab

2007-11-06 Thread Reg Me Please
> TIP 1: if posting/reading through Usenet, please send an appropriate >subscribe-nomail command to [EMAIL PROTECTED] so that your >message can get through to the mailing list cleanly -- Reg me Please ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Reg Me Please
one in the OS or database side? I > > had attached the iostat and vmstat results of postgresql > > > > Thanks > > > > __ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around >

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Reg Me Please
While I would not spend resources in fine tuning the count(*), I would spend some to underastand why and how the other ones do it better. Just to be better. Il Tuesday 06 November 2007 15:29:34 Bill Moran ha scritto: > In response to Reg Me Please <[EMAIL PROTECTED]>: > > I have

Re: [GENERAL] How does the query planner make its plan?

2007-11-06 Thread Reg Me Please
same scale as above > cpu_index_tuple_cost = 0.001 > #cpu_operator_cost = 0.0025 # same scale as above > #effective_cache_size = 128MB > effective_cache_size = 4GB > > The machine is a dedicated database server with two dual-core xeon > processors and 8 GB memory. > > Thanks for your help, > Christian -- Reg me Please ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] external editor for psql

2007-11-06 Thread Reg Me Please
ype.vim in order to add this line: au BufNewFile,BufRead *.psqlsetf postgresql Now all .psql files get the Posgres highlighting. -- Reg me Please ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] Syntax error in a large COPY

2007-11-06 Thread Reg Me Please
he last one (the one containing the \.). Is there a way to know which line is really malformed? Thanks. -- Reg me Please ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if y

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Reg Me Please
That seems not to be the case. The last line has a \. by its own and the last but one is well formed. Il Tuesday 06 November 2007 19:14:00 Tom Lane ha scritto: > Reg Me Please <[EMAIL PROTECTED]> writes: > > At a certain point I get an error telling about a > > "inv

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Reg Me Please
Il Tuesday 06 November 2007 22:13:15 hai scritto: > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > Il Tuesday 06 November 2007 19:43:38 Scott Marlowe ha scritto: > > > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > > > That seems not t

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Reg Me Please
Il Tuesday 06 November 2007 19:43:38 Scott Marlowe ha scritto: > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > That seems not to be the case. > > The last line has a \. by its own and the last but one is > > well formed. > > (Please don't top post.

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Reg Me Please
Il Tuesday 06 November 2007 22:37:12 Scott Marlowe ha scritto: > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > Il Tuesday 06 November 2007 22:13:15 hai scritto: > > > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > > > Il Tuesday

Re: [GENERAL] returning dynamic record

2007-11-06 Thread Reg Me Please
regards, tom lane Maybe create function foo (f1 out int, f2 out varchar, f3 out int) returns setof record as $body$ ... will return the set. -- Reg me Please ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Reg Me Please
Il Wednesday 07 November 2007 01:29:44 Alvaro Herrera ha scritto: > Reg Me Please wrote: > > Il Tuesday 06 November 2007 22:13:15 hai scritto: > > That's the "branch and bound". Editing 29M+ lines file takes some time. > > But this is the way I'm going t

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Reg Me Please
Il Wednesday 07 November 2007 07:54:41 Reg Me Please ha scritto: > Il Wednesday 07 November 2007 01:29:44 Alvaro Herrera ha scritto: > > Reg Me Please wrote: > > > Il Tuesday 06 November 2007 22:13:15 hai scritto: > > > That's the "branch and bound"

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Reg Me Please
Il Wednesday 07 November 2007 11:10:40 Dimitri Fontaine ha scritto: > Le mercredi 07 novembre 2007, Reg Me Please a écrit : > > pgloader seems not that easy to use for a newbie like myself. > > Also because domentation seems too skinny. > > Sorry about this, writting docume

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Reg Me Please
Il Wednesday 07 November 2007 11:26:56 Dimitri Fontaine ha scritto: > Le mercredi 07 novembre 2007, Reg Me Please a écrit : > > Maybe just a complete example would suffice. Let's say a table structure, > > a CSV and a raw text file, a config file and the run output. > >

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Reg Me Please
Il Tuesday 06 November 2007 19:05:52 Reg Me Please ha scritto: > Hi all. > I'm generating an SQL script to load some million rows into a table. > I'm trying to use the COPY command in order to speed the load up. > > At a certain point I get an error telling about a > &q

Re: [GENERAL] Postgresql simple query performance question

2007-11-07 Thread Reg Me Please
Il Wednesday 07 November 2007 13:08:46 André Volpato ha scritto: > > > > > > > > Reid Thompson escreveu: Would it be possible to avoid the so-called "HTML email body"? -- Reg me Please ---(end of broadcast)--

Re: [GENERAL] prepared statements suboptimal?

2007-11-07 Thread Reg Me Please
performances becasue you are going to send the whole query again and again to the planner. Of course you need a plpgsql function for this. -- Reg me Please ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriat

Re: [GENERAL] Postgresql simple query performance question

2007-11-07 Thread Reg Me Please
Il Wednesday 07 November 2007 13:47:26 SHARMILA JOTHIRAJAH ha scritto: > Hi > we are testing with version PostgreSQL 8.2.3. Why not using at least the current 8.2.5? Read here http://www.postgresql.org/docs/current/static/release.html for details. -- Reg me

Re: [GENERAL] what is the date format in binary query results

2007-11-08 Thread Reg Me Please
Il Thursday 08 November 2007 17:09:22 Tom Lane ha scritto: > Reg Me Please <[EMAIL PROTECTED]> writes: > > Il Thursday 08 November 2007 16:18:58 Tom Lane ha scritto: > >> It's either an int8 representing microseconds away from 2000-01-01 > >> 00:00:00 UTC,

Re: [GENERAL] what is the date format in binary query results

2007-11-08 Thread Reg Me Please
when there is a choice between int8 and float8 representation? -- Reg me Please ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

[GENERAL] Warning about max_fsm_pages: what's that?

2007-11-09 Thread Reg Me Please
ter "max_fsm_pages". The table in question contains some 14M+ rows. Would it be possible to get some reference or suggestion in order to understand better the provided hint? This is the very first time I see this message. Many thanks. -- Reg me Please ---(end o

Re: [GENERAL] PIPELINED Functions

2007-11-09 Thread Reg Me Please
rning set of rows. I have no idea about pipelined functions. -- Reg me Please ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] Filter tables

2007-11-12 Thread Reg Me Please
. I have a rather complex solution in mind with loops in a plpgsql function and am wondering whether there is one simpler. Thanks a lot. -- Reg me Please ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Filter tables

2007-11-12 Thread Reg Me Please
Il Monday 12 November 2007 17:05:18 Dimitri Fontaine ha scritto: > Hi, > > Le lundi 12 novembre 2007, Reg Me Please a écrit : > > What I'd need to do is to "filter" t1 against f1 to get only the rows > > ( 'field1',1 ) and ( 'field2',1

Re: [GENERAL] Filter tables

2007-11-12 Thread Reg Me Please
ERE f1.t = x1.t > AND t1.id = x1.id)); > > Osvaldo Nice, it seems to work. But I fear it won't with a longer f1 filter table. Let me think about it. -- Reg me Please ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Postgres table size

2007-11-13 Thread Reg Me Please
es postgresql generally occupy more space than oracle tables? > Thanks > Sharmila This's an interesting point fore sure as far as the data types for the two table are comparable. If this yelds true, the more space an RDBMS occupies, the slower the access. I think. -- Reg me Please ---

Re: [GENERAL] Bulk Load Ignore/Skip Feature

2007-11-13 Thread Reg Me Please
gt; Cheers pgloader http://pgfoundry.org/projects/pgloader/ -- Reg me Please ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

[GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-14 Thread Reg Me Please
yntax limitation, as the sematics is not. Wouldn't it be a nice enhacement to allow variable LIMIT and OFFSET in SELECTs? -- Reg me Please ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-15 Thread Reg Me Please
In any case, what'd be the benefit for not allowing "variables" as LIMIT and OFFSET argument? -- Reg me Please ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an ind

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-15 Thread Reg Me Please
Il Thursday 15 November 2007 17:55:42 Sam Mason ha scritto: > On Thu, Nov 15, 2007 at 05:34:43PM +0100, Reg Me Please wrote: > > Il Thursday 15 November 2007 14:09:16 Trevor Talbot ha scritto: > > > On 11/15/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > > >

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-15 Thread Reg Me Please
Il Thursday 15 November 2007 20:28:17 hai scritto: > Reg Me Please wrote: > > Sorry but I don't understand. > > > > Either the LIMIT and OFFSET are to be definitely CONSTANT or not. > > They must be constant during the execution of the query. > > > In the S

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-15 Thread Reg Me Please
ion into a LIMIT or OFFSET". And under some circumstances (SQL function body) it's true even with VARIABLE expressions like function call arguments. In my opinion I would say it's more a problem with the syntax checker that with the planner ("semantics" in my lingo). But I

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-15 Thread Reg Me Please
t it's not serious enough to be unlocked. Sigh! :-) -- Reg me Please ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-15 Thread Reg Me Please
Il Thursday 15 November 2007 23:08:10 Richard Huxton ha scritto: > Reg Me Please wrote: > > Il Thursday 15 November 2007 20:28:17 hai scritto: > >> Reg Me Please wrote: > >>> In my opinion I would say it's more a problem with the syntax checker > >>>

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-16 Thread Reg Me Please
Il Friday 16 November 2007 08:33:14 Tom Lane ha scritto: > Reg Me Please <[EMAIL PROTECTED]> writes: > >> The OP's complaint is that we don't allow a variable of the query's own > >> level, but AFAICT he's still not grasped the point that

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-16 Thread Reg Me Please
Il Thursday 15 November 2007 14:09:16 Trevor Talbot ha scritto: > On 11/15/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > In any case, what'd be the benefit for not allowing "variables" as LIMIT > > and OFFSET argument? > > When you can fully desc

Re: [GENERAL] Timestamp without timezone

2007-11-20 Thread Reg Me Please
"timestamp without time zone" is DATE type. > > How can I solve this? > > ---(end of broadcast)--- > TIP 4: Have you searched our list archives? > >http://archives.postgresql.org/ It's very likely that y

[GENERAL] MAybe a FAQ

2007-11-20 Thread Reg Me Please
Hi all. What'd be the right place to put a "feature request" for the next releases and for bugs in the current one? Thanks. -- Reg me Please ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

[GENERAL] Table filter

2007-11-21 Thread Reg Me Please
A filter is a list of property values needed to qualify an entity as "good". An entity evaluates as good only when all property values in the filter match the ones associated to an item in t_data. What's missing to me is how to apply a filter to the t_data and get the list of the items

Re: [GENERAL] Table filter

2007-11-21 Thread Reg Me Please
Il Wednesday 21 November 2007 16:41:03 Rodrigo De León ha scritto: > On Nov 21, 2007 9:21 AM, Reg Me Please <[EMAIL PROTECTED]> wrote: > > Hi all. > > > > I've the following concept. > > > > This smells like EAV. > > Please read > > http:/

Re: [GENERAL] Table filter

2007-11-21 Thread Reg Me Please
Il Wednesday 21 November 2007 20:22:46 Joe Conway ha scritto: > Reg Me Please wrote: > > The meaning is that an entity called by the value of "item" has a number > > of properties called by "property" with value "prop_value". > > So, for a single

[GENERAL] EAV or not to EAV?

2007-11-22 Thread Reg Me Please
contrib. Is there a better idea than mine? I hope so. -- Reg me Please ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] LIBPQ: Can we have buffered PGresult (i.e. a retreival bu chuncks?)

2007-11-22 Thread Reg Me Please
--(end of broadcast)--- > TIP 6: explain analyze is your friend I presume that the usal LIMIT+OFFSET solution is not OK. Right? -- Reg me Please ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] "Suspending" indexes and constraint updates

2007-12-04 Thread Reg Me Please
he inserts and then re-creating both indexes and constraints. Is there a way to "suspend" the index updates and the constraint checks before the inserts in order to later re-enable them and do a reindex? TIA. -- Reg me, please! ---(end of broadcast)-

Re: [GENERAL] "Suspending" indexes and constraint updates

2007-12-04 Thread Reg Me Please
Il Tuesday 04 December 2007 11:50:21 Peter Eisentraut ha scritto: > Am Dienstag, 4. Dezember 2007 schrieb Reg Me Please: > > Is there a way to "suspend" the index updates and the constraint checks > > before the inserts in order to later re-enable them and do a reindex? &g

[GENERAL] COPY speedup

2007-12-13 Thread Reg Me Please
this necessary, or could I save some of them (maybe just the DEFAULT) with no speed cost? Is there a way to "automate" this by using the information_schema? Many thanks in advance. -- Reg me, please! ---(end of broadcast)--- TIP 1: if posting/

Re: [GENERAL] COPY speedup

2007-12-13 Thread Reg Me Please
Il Thursday 13 December 2007 19:56:02 Tom Lane ha scritto: > Reg Me Please <[EMAIL PROTECTED]> writes: > > In order to speed up the COPY ... FROM ... command, I've > > disabled everything (primary key, not null, references, default and > > indexes) in the table de

[GENERAL] Rich LIKE inheritance

2007-12-19 Thread Reg Me Please
P NOT NULL DEFAULT 'INFINTY' ); CREATE INDEX i_story_base ON story_base( flag,starting,ending ); CREATE TABLE atable ( sometext TEXT, LIKE story_base INCLUDING DEFAULTS ); I'd like atable to also "inherit" an index like the one defined for story_b

[GENERAL] COPY with composite type column

2007-12-26 Thread Reg Me Please
I write "((ct.).ct1)". Any hint on how to write this COPY? -- Reg me, please! ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] COPY with composite type column

2007-12-26 Thread Reg Me Please
Il Wednesday 26 December 2007 12:58:34 Reg Me Please ha scritto: > Hi all. > > I have this composite type: > > create type ct as ( > ct1 text, > ct2 int > ); > > Then I have this table > > create table atable ( > somedata numeric, > otherdata text

Re: [GENERAL] COPY with composite type column

2007-12-26 Thread Reg Me Please
Il Wednesday 26 December 2007 14:31:04 Reg Me Please ha scritto: > Il Wednesday 26 December 2007 12:58:34 Reg Me Please ha scritto: > > Hi all. > > > > I have this composite type: > > > > create type ct as ( > > ct1 text, > > ct2 int > > );

[GENERAL] Hinting the planner

2008-01-01 Thread Reg Me Please
Hello all. I have some tables that contain exactly 1 row and that I use for searches with JOIN. Does it make any sense to hint the planner about this? If so, how can I send such hints to it? -- Reg me, please! ---(end of broadcast)--- TIP 9: In

[GENERAL] INSERT with a composite columnt from query

2008-01-16 Thread Reg Me Please
t the results from f_compo() into the table TAB along with a value x. I expected somthing like this to work: insert into tab select 42,row( c.* ) from f_compo() c; But I get ERROR: cannot cast type record to compo Any hint? TALIA -- Reg me, please! ---(end of broa

[GENERAL] Accessing composite type columns from C

2008-01-17 Thread Reg Me Please
Hi all. Is there a way with the libpq to access "subcolumns" in a composite type column? The documentation (8.2) seems not to mention this case. Thanks. -- Reg me, please! ---(end of broadcast)--- TIP 4: Have you searched our lis

Re: [GENERAL] Question about indexes

2008-09-16 Thread Reg Me Please
Any hint? > Hi all. > I usually create indexes accordingly to the queries used in my software. > This means the more often than not I have composited indexes over more than > one column. > What'd be in PGSQL (v8.3+) the pros and cons of having instead only > one-column indexes? > Thanks in advance

Re: [GENERAL] Question about indexes

2008-09-16 Thread Reg Me Please
As I told you, I use to design indexes based upon the queries, the WHERE clauses especially. My fear is that in PGSQL the runtime "index composition" can be a drawback to the performances if compared to "static index composition". Is this true accordingly to your experience? Is there any "best

Re: [GENERAL] PDF Documentation for 8.3?

2008-09-21 Thread Reg Me Please
NOthing bad, except that a number of tables are actually unreadable and some code example lines are going past the right margin. Apart of this, I would say it's great documentation. On Sunday 21 September 2008 11:52:44 Sven Marcel Buchholz wrote: > Michelle Konzack schrieb: > > Hello, > > > > I a

[GENERAL] Counting rows in a PL/PgSQL CURSOR without fetching?

2008-09-25 Thread Reg Me Please
Hi all. Is there a way in PL/PgSQL to get the number of rows resulting from a: OPEN curs1 SCROLL FOR EXECUTE query; before actually fetching any? Unuckily MOVE LAST FROM curs1; won't work with GET DIAGNOSTICS cnt = ROW_COUNT; Any hint? -- Sent via pgsql-general mailing l

[GENERAL] Dynamically created cursors vanish in PLPgSQL

2008-09-25 Thread Reg Me Please
Hi all. I'm running PGSQL v.8.3.3 I tried to adapt the examples from the friendly manual (38.7.3.5) in order to to have a function to create cursors based on a parametric query string: CREATE SEQUENCE s_cursors; CREATE OR REPLACE FUNCTION f_cursor( query text, out curs refcursor ) LANGUAGE PLPG

Re: [GENERAL] Dynamically created cursors vanish in PLPgSQL

2008-09-26 Thread Reg Me Please
ss.html > > regards > Pavel Stehule > > p.s. you should to use transaction > > 2008/9/25 Reg Me Please <[EMAIL PROTECTED]>: > > Hi all. > > > > I'm running PGSQL v.8.3.3 > > > > I tried to adapt the examples from the friendly manual (3

[GENERAL] Transactions within a function body

2008-10-01 Thread Reg Me Please
Hi all. Is there a way to have (sub)transactions within a function body? I'd like to execute some code (a transaction!) inside a function and later decide whether that transaction is to be committed or not. Thanks. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make c

Re: [GENERAL] Transactions within a function body

2008-10-02 Thread Reg Me Please
Well, if it is a limitation, and having it would lead to a "better product", why not making it a feature for the next still-open release? In my opinion that's more than a limitation, it's a missing feature. In your code you often need to create savepoints to delay the decision for the commitment.

Re: [GENERAL] Transactions within a function body

2008-10-02 Thread Reg Me Please
Hi. My humble opinion follows. One point here is that the decision for the ROLLBACK could possibly be different from errors. It could simply be based upon a generic expression, not just the conditions seen in "Appendix A" of the manual. An exception is something different from a transaction, de

Re: [GENERAL] Transactions within a function body

2008-10-02 Thread Reg Me Please
Il Thursday 02 October 2008 16:15:10 Alvaro Herrera ha scritto: > Reg Me Please escribió: > > Well, if it is a limitation, and having it would lead to a "better > > product", why not making it a feature for the next still-open release? > > Because no one is working

Re: [GENERAL] Transactions within a function body

2008-10-02 Thread Reg Me Please
Il Thursday 02 October 2008 17:10:23 Alvaro Herrera ha scritto: > Reg Me Please escribió: > > Il Thursday 02 October 2008 16:15:10 Alvaro Herrera ha scritto: > > > You can nest blocks arbitrarily, giving you the chance to selectively > > > rollback pieces of the func

[GENERAL] NATURAL JOINs

2008-10-13 Thread Reg Me Please
Hi all. I'm running v8.3.3 First point. Is there a way to know how a NATURAL JOIN is actually done? That is, which fields are actually used for the join? The EXPLAIN directive doesn't show anyting useful. Second point. I have this: CREATE TABLE tab_dictionary ( item text primary key ); CREATE

Re: [GENERAL] NATURAL JOINs

2008-10-15 Thread Reg Me Please
Il Wednesday 15 October 2008 17:55:03 Tom Lane ha scritto: > "Richard Broersma" <[EMAIL PROTECTED]> writes: > > For this reason, clients passing natural joins to the server can have > > dangerous result sets returned with no warning. > > Yeah. A lot of people consider that NATURAL JOIN is simply a

[GENERAL] CREATE DOMAIN with REFERENCES

2008-10-17 Thread Reg Me Please
Hello all. I have a number of tables that are actually dictionaries. This means that, in order to keep the reference integrity, in a number of other tables I have FK definitions like these ones: CREATE TABLE dict1 ( d1 TEXT PRIMARY KEY, ... ); CREATE TABLE user1 ( d1 TEXT NOT NULL REFERENCES dic

[GENERAL] [PGSQL 8.3.5] How to handle FKs with partitioning?

2008-12-19 Thread Reg Me Please
Hi all. I need to implement something very similar to temporal table partitioning as described in the documentation at chapter 5.9. My issues come from the fact that I have other tables that references (FKs) to the table(s) to be partitioned. Those references are enforced by means of DRI statem

Re: [GENERAL] [PGSQL 8.3.5] How to handle FKs with partitioning?

2008-12-20 Thread Reg Me Please
would get some other loss because of an external table needed for the partitioning. On Friday December 19 2008 17:15:56 Merlin Moncure wrote: > On Fri, Dec 19, 2008 at 6:04 AM, Reg Me Please wrote: > > Hi all. > > > > I need to implement something very similar to temporal t

[GENERAL] [PGSQL 8.3.5] Use of a partial indexes

2008-12-29 Thread Reg Me Please
HI all. I have a 8M+ rows table over which I run a query with a and-only WHERE condition. The table has been periodically VACUUMed and ANALYZEd. In the attempt of speeding that up I added a partial index in order to limit the size of the index. Of course that index is modeled after a "slowly var

Re: [GENERAL] [PGSQL 8.3.5] Use of a partial indexes

2008-12-29 Thread Reg Me Please
only with different search criteris. IOW, force it to > go back out to disk. You may find that the slow performance returns. > > Good Luck ! > > -dave > > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org]

Re: [GENERAL] [PGSQL 8.3.5] Use of a partial indexes

2008-12-30 Thread Reg Me Please
Only one question remains in my mind: why the planner is not using the partial index? The partial index is covering 2 predicates out of the 3 used in the where condition. Actually there is a boolean flag (to exclude "disabled" rows), a timestamp (for row age) and an int8 (a FK to another table).

Re: [GENERAL] [PGSQL 8.3.5] Use of a partial indexes

2008-12-30 Thread Reg Me Please
eifen, grüner Rand On Tuesday December 30 2008 15:12:33 Scott Marlowe wrote: > On Tue, Dec 30, 2008 at 2:02 AM, Reg Me Please wrote: > > Only one question remains in my mind: > > > > why the planner is not using the partial index? > > > > The partial index is cove

Re: [GENERAL] [PGSQL 8.3.5] Use of a partial indexes

2008-12-31 Thread Reg Me Please
incent > > > -Message d'origine- > > De : pgsql-general-ow...@postgresql.org > > [mailto:pgsql-general-ow...@postgresql.org] De la part de Reg > > Me Please > > Envoyé : mardi 30 décembre 2008 17:09 > > À : Scott Marlowe > > Cc : Scott Ri

Re: [GENERAL] auto insert data every one minute

2009-01-03 Thread Reg Me Please
You need to write a process that will do it. At best you can use crontab if your a lucky and use Unix. -- Fahrbahn ist ein graues Band weisse Streifen, grüner Rand On Saturday January 3 2009 11:46:47 searchelite wrote: > Daniel Verite wrote: > > searchelite wrote: > > > > > > How about usin

Re: [GENERAL] Error: column "host" does not exist

2009-01-07 Thread Reg Me Please
IS there any name clash with a function argument? -- Fahrbahn ist ein graues Band weisse Streifen, grüner Rand On Thursday 08 January 2009 08:30:07 Mayuresh Nirhali wrote: > Hello, > > I am working with 8.1.4 pgsql as my database backend. I have a function > written in plpgsql language, that quer

  1   2   >