[GENERAL] 64bits or 32 bits on ESX?

2010-01-20 Thread Bjørn T Johansen
We are going to be setting up a PostgreSQL server on a guest under VMWare ESX 4... Is there any performance improvement by choosing 64bits Linux over 32bits Linux as the guest OS or is it almost the same? Regards, BTJ --

Re: [GENERAL] function to grant select on all tables in several schemas

2010-01-20 Thread Gerd Koenig
Hello Andreas, thanks for your support, perfect :-) regardsGERD On Wednesday 20 January 2010 4:59:57 pm Andreas Kretschmer wrote: > Gerd Koenig wrote: > > Hello, > > > > I'm looking for a solution to grant select to a group to have "read-only" > > group across all tables/views/.. in sev

Re: [GENERAL] helo

2010-01-20 Thread A. Kretschmer
In response to beulah prasanthi : > I am using postgres 8.4 > using views i retrived some details from multiple tables > can i insert the data into multiple tables using views.if not > how can i insert the data into multiple tables in a single trip > is there any option .Please help me > You can

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

2010-01-20 Thread Adrian von Bidder
On Wednesday 20 January 2010 15.42:14 Ivan Sergio Borgonovo wrote: > I'd also appreciate some suggestion about dev environment and best > practices on Debian, something that could help me to compile, > install, test easily on Debian. (Disclaimer: Haven't done any postgres related programming so fa

Re: [GENERAL] helo

2010-01-20 Thread John R Pierce
beulah prasanthi wrote: I am using postgres 8.4 using views i retrived some details from multiple tables can i insert the data into multiple tables using views.if not how can i insert the data into multiple tables in a single trip is there any option .Please help me use a transaction bracketed

[GENERAL] helo

2010-01-20 Thread beulah prasanthi
I am using postgres 8.4 using views i retrived some details from multiple tables can i insert the data into multiple tables using views.if not how can i insert the data into multiple tables in a single trip is there any option .Please help me

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

2010-01-20 Thread Greg Smith
Ivan Sergio Borgonovo wrote: It would be nice to at least a list of functions that could be used in extension development to avoid reading all the source. psql -E \df * This will dump out a list of all the built-in functions in the server. It will also show you the query that did so, I get

Re: [GENERAL] Can I use LIKE to achieve the following result

2010-01-20 Thread Ricardo Fuentes
Hi. You can return a set of record of that table with a sentence including the LIKE operator, i.e. SELECT ID, Item FROM your_table WHERE item LIKE 'Car_'; and you would get this result: ID | Item = 0 | Car1 1 | Car2 2 | Car3 Take a look of the documentation in the postgresql documen

Re: [GENERAL] Can I use LIKE to achieve the following result

2010-01-20 Thread Harry McCarney
Something like this will be possible but your data sets are contradictory. There is no 3 | Cat Row in the original table.. -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Yan Cheng Cheok Sent: 20 January 2010 18:23 To:

[GENERAL] Can I use LIKE to achieve the following result

2010-01-20 Thread Yan Cheng Cheok
I have the following original table : ID | Item = 0 | Car1 1 | Car2 2 | Car3 3 | Cat1 4 | Cat2 5 | Cat3 I would like to return setof record, with the following : ID | Item = 0 | Car1 1 | Car2 2 | Car3 3 | Cat Is it possible to achieve using LIKE command? Thanks and Re

Re: [GENERAL] About partitioning

2010-01-20 Thread Filip Rembiałkowski
W dniu 20 stycznia 2010 12:01 użytkownik Grzegorz Jaśkiewicz < gryz...@gmail.com> napisał: > please use search before asking. > please use search before advising to use search; it's not so easy to find. can you share a link to archived post? Filip

Re: [GENERAL] Statement level triggers

2010-01-20 Thread Harald Fuchs
In article <4b5702b9.50...@postnewspapers.com.au>, Craig Ringer writes: >> What'd be the behavior of a (plpgsql) trigger function when called as >> a statement level trigger? >> Let's say that a statement will involve more than one row. >> The documentation (v8.4.2, "35.1. Overview of Trigger Beh

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

2010-01-20 Thread Ivan Sergio Borgonovo
On Wed, 20 Jan 2010 17:38:17 +0100 Pavel Stehule wrote: > > Is there a reference of all macro and functions? > no, only source code It would be nice to at least a list of functions that could be used in extension development to avoid reading all the source. Since I'm a new entry in pg C coding

Re: [GENERAL] About partitioning

2010-01-20 Thread Vincenzo Romano
2010/1/20 Vincenzo Romano : > 2010/1/20 Adrian von Bidder : >> Hi, >> >> On Wednesday 20 January 2010 11.57:37 Vincenzo Romano wrote: >>> 2010/1/20 Adrian von Bidder : >> >>> > [ creating db partitions on demand ] >>> > >>> > On Wednesday 20 January 2010 11.20:21 Vincenzo Romano wrote: >>> >> In ca

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

2010-01-20 Thread Pavel Stehule
2010/1/20 Ivan Sergio Borgonovo : > On Wed, 20 Jan 2010 16:56:04 +0100 > Dimitri Fontaine wrote: > >> Ivan Sergio Borgonovo writes: >> > I haven't been able to find anything better than the online >> > manual and pg source code to learn how to write extensions. >> >> Maybe this will help: >>   ht

Re: [GENERAL] Is there a messaging system for Postresql

2010-01-20 Thread Dimitri Fontaine
"Romeliz Valenciano Jr." writes: > We're evaluating Postgresql for a possible transition from MS > SqlServer. We have 100s of MS Sql servers and one way of replicating > data changes is to use MQ Series Queue management system, some servers > who were recently changed to Sql 2005 are using Service

Re: [GENERAL] C: extending text search: from where to start

2010-01-20 Thread Dimitri Fontaine
Ivan Sergio Borgonovo writes: > Any other resource that will help me to write my own contrib? You could try out the following, but it deals a lot with GiST specifics… http://wiki.postgresql.org/wiki/Image:Prato_2008_prefix.pdf Regards, -- dim -- Sent via pgsql-general mailing list (pgsql-g

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

2010-01-20 Thread Ivan Sergio Borgonovo
On Wed, 20 Jan 2010 16:56:04 +0100 Dimitri Fontaine wrote: > Ivan Sergio Borgonovo writes: > > I haven't been able to find anything better than the online > > manual and pg source code to learn how to write extensions. > > Maybe this will help: > http://wiki.postgresql.org/wiki/Image:Prato_20

[GENERAL] Is there a messaging system for Postresql

2010-01-20 Thread Romeliz Valenciano Jr.
Hi, We're evaluating Postgresql for a possible transition from MS SqlServer. We have 100s of MS Sql servers and one way of replicating data changes is to use MQ Series Queue management system, some servers who were recently changed to Sql 2005 are using Service Broker. We're interested if there

Re: [GENERAL] About partitioning

2010-01-20 Thread Vincenzo Romano
2010/1/20 Adrian von Bidder : > Hi, > > On Wednesday 20 January 2010 11.57:37 Vincenzo Romano wrote: >> 2010/1/20 Adrian von Bidder : > >> > [ creating db partitions on demand ] >> > >> > On Wednesday 20 January 2010 11.20:21 Vincenzo Romano wrote: >> >> In case 1 I need to inspect the catalog with

Re: [GENERAL] About partitioning

2010-01-20 Thread Adrian von Bidder
Hi, On Wednesday 20 January 2010 11.57:37 Vincenzo Romano wrote: > 2010/1/20 Adrian von Bidder : > > [ creating db partitions on demand ] > > > > On Wednesday 20 January 2010 11.20:21 Vincenzo Romano wrote: > >> In case 1 I need to inspect the catalog with at least a select, while > >> in case 2

Re: [GENERAL] function to grant select on all tables in several schemas

2010-01-20 Thread Andreas Kretschmer
Gerd Koenig wrote: > Hello, > > I'm looking for a solution to grant select to a group to have "read-only" > group across all tables/views/.. in several schemas. I already found some > workarounds and I decided to create a function to cover this topic. > But calling this function throws the err

Re: [GENERAL] function to grant select on all tables in several schemas

2010-01-20 Thread Pavel Stehule
Hello I am not sure, but maybe .. you are doesn't use correct quotes: you use ´´, but you have to use '' Regards Pavel Stehule 2010/1/20 Gerd Koenig : > Hello, > > I'm looking for a solution to grant select to a group to have "read-only" > group across all tables/views/.. in several schemas. I

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

2010-01-20 Thread Dimitri Fontaine
Ivan Sergio Borgonovo writes: > I haven't been able to find anything better than the online manual > and pg source code to learn how to write extensions. Maybe this will help: http://wiki.postgresql.org/wiki/Image:Prato_2008_prefix.pdf http://github.com/dimitri/prefix Regards, -- dim -- S

[GENERAL] function to grant select on all tables in several schemas

2010-01-20 Thread Gerd Koenig
Hello, I'm looking for a solution to grant select to a group to have "read-only" group across all tables/views/.. in several schemas. I already found some workarounds and I decided to create a function to cover this topic. But calling this function throws the error: "" ERROR: column "´r´" does

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

2010-01-20 Thread Pavel Stehule
2010/1/20 Ivan Sergio Borgonovo : > I haven't been able to find anything better than the online manual > and pg source code to learn how to write extensions. > > I couldn't find a reference of all the function/macros I could use > and some more examples on how to use them. look on contrib director

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

2010-01-20 Thread Pavel Stehule
Hello I wrote one article some years ago http://www.postgres.cz/index.php/Project_of_UDF_and_its_realization_at_C_for_PostgreSQL The core is correct, but there are some issues, it is for 8.0. regards Pavel Stehule 2010/1/20 Ivan Sergio Borgonovo : > I haven't been able to find anything better

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

2010-01-20 Thread Vincenzo Romano
2010/1/20 Ivan Sergio Borgonovo : > I haven't been able to find anything better than the online manual > and pg source code to learn how to write extensions. > > I couldn't find a reference of all the function/macros I could use > and some more examples on how to use them. > > I'd also appreciate s

[GENERAL] more docs on extending postgres in C

2010-01-20 Thread Ivan Sergio Borgonovo
I haven't been able to find anything better than the online manual and pg source code to learn how to write extensions. I couldn't find a reference of all the function/macros I could use and some more examples on how to use them. I'd also appreciate some suggestion about dev environment and best

Re: [GENERAL] Varidic function (printf) not found within a trigger

2010-01-20 Thread Pavel Stehule
2010/1/20 Vincenzo Romano : > Hi all. > > Within a trigger function I need to call a variadic function (actually > the printf found on  http://wiki.postgresql.org/wiki/Sprintf). > When the trigger is fired I get the following: > > function printf(text, timestamp without time zone, timestamp without

[GENERAL] Varidic function (printf) not found within a trigger

2010-01-20 Thread Vincenzo Romano
Hi all. Within a trigger function I need to call a variadic function (actually the printf found on http://wiki.postgresql.org/wiki/Sprintf). When the trigger is fired I get the following: function printf(text, timestamp without time zone, timestamp without time zone, text) does not exist LINE 1:

Re: [GENERAL] Statement level triggers

2010-01-20 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > What'd be the behavior of a (plpgsql) trigger function when called as > a statement level trigger? > Let's say that a statement will involve more than one row. > The documentation (v8.4.2, "35.1. Overview of Trigger Behavior") says: > > "State

Re: [GENERAL] Statement level triggers

2010-01-20 Thread Craig Ringer
Vincenzo Romano wrote: > Hi all. > > What'd be the behavior of a (plpgsql) trigger function when called as > a statement level trigger? > Let's say that a statement will involve more than one row. > The documentation (v8.4.2, "35.1. Overview of Trigger Behavior") says: > > "Statement-level trigge

Re: [GENERAL] C: extending text search: from where to start

2010-01-20 Thread Ivan Sergio Borgonovo
On Tue, 19 Jan 2010 10:12:21 +0100 Dimitri Fontaine wrote: > Ivan Sergio Borgonovo writes: > > I'd appreciate any pointer that will quickly put me on the right > > track. > > I'd guess you begin here: > http://wiki.postgresql.org/wiki/Developer_FAQ With the exception of formatting style info

Re: [GENERAL] About partitioning

2010-01-20 Thread Grzegorz Jaśkiewicz
I submitted a solution here once in the past, please use search before asking. the exception handling will be quicker in general, cos you won't have to test for existence of the table before every insert. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] About partitioning

2010-01-20 Thread Vincenzo Romano
2010/1/20 Adrian von Bidder : > Hi, > > [ creating db partitions on demand ] > > On Wednesday 20 January 2010 11.20:21 Vincenzo Romano wrote: >> In case 1 I need to inspect the catalog with at least a select, while >> in case 2 I need to trap errors. >> In my (little) experience trapping errors is

Re: [GENERAL] Size of row-metadata?

2010-01-20 Thread Thomas Kellerer
tmp, 20.01.2010 11:25: http://www.postgresql.org/docs/8.4/static/storage-page-layout.html I fail to find the size of the *row* header on that link. "All table rows are structured in the same way. There is a fixed-size header (occupying 23 bytes on most machines), followed by an optional null

Re: [GENERAL] About partitioning

2010-01-20 Thread Adrian von Bidder
Hi, [ creating db partitions on demand ] On Wednesday 20 January 2010 11.20:21 Vincenzo Romano wrote: > In case 1 I need to inspect the catalog with at least a select, while > in case 2 I need to trap errors. > In my (little) experience trapping errors is slow, so I would go for > option 1. Tra

Re: [GENERAL] Size of row-metadata?

2010-01-20 Thread tmp
http://www.postgresql.org/docs/8.4/static/storage-page-layout.html I fail to find the size of the *row* header on that link. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] About partitioning

2010-01-20 Thread Vincenzo Romano
A main issue in my case with the suggested (chapter 5.9) implementation is that child tables need to be created in advance, For a number of reasons (complex partitioning schemas, rows also related to the past and the future) it'd be unpractical to create all of them in advance. So I'm thinking abou

Re: [GENERAL] Size of row-metadata?

2010-01-20 Thread A. Kretschmer
In response to tmp : > What is the width (in bytes) of the meta data associated with each row > in postgresql? http://www.postgresql.org/docs/8.4/static/storage-page-layout.html -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG: 0x31720C99, 1006 C

[GENERAL] Statement level triggers

2010-01-20 Thread Vincenzo Romano
Hi all. What'd be the behavior of a (plpgsql) trigger function when called as a statement level trigger? Let's say that a statement will involve more than one row. The documentation (v8.4.2, "35.1. Overview of Trigger Behavior") says: "Statement-level triggers do not currently have any way to exa

[GENERAL] Size of row-metadata?

2010-01-20 Thread tmp
What is the width (in bytes) of the meta data associated with each row in postgresql? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Help on constructing a query that matches array

2010-01-20 Thread Dean Rasheed
2010/1/19 BlackMage : > > Hey all, > > I need help on constructing a query with arrays that matches the arrays up > as foriegn keys to another table. For example, say that I have two tables, > owners and pets. > > Owner Table > owner_id | pet_ids > 1             |    {1,2,3} > 2             |    {2

Re: [GENERAL] Why Stored Procedure is Slower In The Following Case?

2010-01-20 Thread Yan Cheng Cheok
Thanks. I am able to solve my problem using the following (EXECUTE) : CREATE OR REPLACE FUNCTION get_measurements(IN bigint, IN text) RETURNS TABLE(_type text, _value double precision, _unit text) AS $BODY$DECLARE _lotID ALIAS FOR $1; _type ALIAS FOR $2; BEGIN RETURN QUERY EXECUTE 'S