Re: [GENERAL] date_trunct() and start of week

2009-11-26 Thread Thomas Kellerer
Adrian Klaver, 26.11.2009 23:15: On Thursday 26 November 2009 1:59:05 pm Thomas Kellerer wrote: Hi, while using date_trunc('week', some_date) to get the date of the first day of the week I noticed that it was working as expected: Monday is considered the start of the week. I a

Re: [GENERAL] date_trunct() and start of week

2009-11-27 Thread Thomas Kellerer
Rikard Bosnjakovic, 27.11.2009 08:49: [...] I'm just curious which setting defines whether monday or sunday is considered the "first day in a week" Read 9.9.2 on http://www.postgresql.org/docs/8.1/static/functions-datetime.html and you will see that even if you find such setting, date_trunc()

Re: [GENERAL] date_trunct() and start of week

2009-11-27 Thread Thomas Kellerer
Thomas Markus, 27.11.2009 09:41: Hi, not all to zero : "that are less significant than the selected one set to zero (or one, for day and month)" Sorry, I missed the "or one" part. see http://www.postgresql.org/docs/8.1/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT dow: "The day o

Re: [GENERAL] Help with starting portable version of postgresql

2009-12-05 Thread Thomas Kellerer
John R Pierce wrote on 06.12.2009 00:01: I downloaded the portable version of Postegresql from http://greg.webhop.net/postgresql_portable It works but the problem is that to start the server you must load it from the gui. Instead since I want to start the server from my app, I need to underst

Re: [GENERAL] Counts and percentages and such

2009-12-08 Thread Thomas Kellerer
jackassplus wrote on 08.12.2009 22:21: What does ::numeric signify? I'm using the jdbc driver from http://jdbc.postgresql.org/ in SQuirreL and it asks me for the value of :numeric. As Scott has pointed out this is a typecast. If Squirrel mistakes that for a parameter, it's clearly a bug in S

Re: [GENERAL] Too many postgres.exe

2009-12-15 Thread Thomas Kellerer
a.bhattacha...@sungard.com, 15.12.2009 10:51: Hi All, I have my application UI in Java and which is communicating with Postgresql database. However whenever my application is running I could see there are too many postgres.exe are created even though the application is not doing anything in dat

Re: [GENERAL] Justifying a PG over MySQL approach to a project

2009-12-16 Thread Thomas Kellerer
Gauthier, Dave wrote on 16.12.2009 22:02: Hi Everyone: Tomorrow, I will need to present to a group of managers (who know nothing about DBs) why I chose to use PG over MySQL in a project, What kind of project is that? If you are developing something that you are selling to other people, MySQL'

Re: [GENERAL] Justifying a PG over MySQL approach to a project

2009-12-16 Thread Thomas Kellerer
Greg Smith wrote on 16.12.2009 22:44: You've probably already found http://wiki.postgresql.org/wiki/Why_PostgreSQL_Instead_of_MySQL:_Comparing_Reliability_and_Speed_in_2007 which was my long treatment of this topic (and overdue for an update). There is an update: http://wiki.postgresql.org/wik

Re: [GENERAL] alter table performance

2009-12-17 Thread Thomas Kellerer
Antonio Goméz Soto wrote on 17.12.2009 22:26: Hi, I am regularly altering tables, adding columns setting default values etc. This very often takes a very long time and is very disk intensive, and this gets pretty annoying. Things are hampered by the fact that some of our servers run PG 7.3 Sup

Re: [GENERAL] Get Comments on Tables / Functions

2009-12-27 Thread Thomas Kellerer
Alex - wrote on 27.12.2009 14:57: Hi, i am adding comments to tables and functions with version information and would like to extract that information through a query. Is there and easy way to do that? simple list. table_name, comment SELECT n.nspname as schema_name, c.relname as table

Re: [GENERAL] Planner Row Estimate with Function

2009-12-29 Thread Thomas Kellerer
Michael Fork wrote on 29.12.2009 18:08: I have an index scan on a custom function that is returning a wildly incorrect row estimate that is throwing off the rest of the query planning. The result of the function is roughly unique - there are a handful with multiple entries - but the planner is e

Re: [GENERAL] Migration of db

2009-12-31 Thread Thomas Kellerer
akp geek wrote on 31.12.2009 21:45: Hi All - We have 2 databases test and prod. Now they are out of sync ( of course they will be to some extent ). But there are some functions in some schemas. we have to sync from prod to test. What I wanted to ask, is there any tool that you recomme

[GENERAL] 8.5 Alpha3 - broken downloadlink

2010-01-04 Thread Thomas Kellerer
Hi, I was trying to download the windows binaries for 8.5alpha3 but the link on the EnterpriseDB page (http://www.enterprisedb.com/products/pgbindownload.do) only returns an error. When I follow the link http://www.enterprisedb.com/getfile.jsp?fileid=824 then I get a 404 Page with the followi

Re: [GENERAL] Data Generators

2010-01-17 Thread Thomas Kellerer
Jamie Kahgee, 17.01.2010 16:26: I'm looking for a data generator. Free would be nice, if possible. Has anyone had good luck w/ anything? maybe point me in a good direction :) Thanks, Jamie K. Have a look at "Benerator" I have been told, that it's quite good (I haven't used it myself though

Re: [GENERAL] Equivalent of mysql type mediablob in postgres?

2010-01-18 Thread Thomas Kellerer
Chris Barnes wrote on 18.01.2010 21:05: I would like to move a table that is used to store images from mysql to postgres. The only stumbling I may encounter, may be switching from mysql blob to something in postgres. We store chart images in a mysql medium blob type. How can I store these in

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] Currently connected users...

2010-01-21 Thread Thomas Kellerer
Dhimant Patel, 21.01.2010 17:40: I'm a beginner Postgres user, and need quick hint from someone. How could I know which users are currently connected to postgres instance? http://www.postgresql.org/docs/current/static/monitoring.html More precisely: http://www.postgresql.org/docs/current/st

Re: [GENERAL] db cluster location

2010-01-21 Thread Thomas Kellerer
Scott Frankel wrote on 21.01.2010 18:34: Hi all, Is there a query I can use to find the location of a db cluster? SELECT name, setting FROM pg_settings WHERE category = 'File Locations'; You need to be connected as the superuser (usually postgres) -- Sent via pgsql-general mailing

Re: [GENERAL] PgSQL problem: How to split strings into rows

2010-01-21 Thread Thomas Kellerer
Kynn Jones wrote on 21.01.2010 19:49: I have a table X with some column K consisting of whitespace-separated words. Is there some SELECT query that will list all these words (for the entire table) so that there's one word per row in the returned table? E.g. If the table X is K ---

Re: [GENERAL] Self-referential records

2010-01-24 Thread Thomas Kellerer
Ovid wrote on 24.01.2010 14:43: Assuming I have the following table: CREATE TABLE refers ( idSERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, parent_id INTEGER NOT NULL, FOREIGN KEY (parent_id) REFERENCES refers(id) ); I need to insert two records

Re: [GENERAL] migrating data from 8.4 to 8.3

2010-02-11 Thread Thomas Kellerer
Marc Lustig, 08.02.2010 11:36: Hi, can we safely put the data from /var/lib/postgresql/8.4/main/ of server x to /var/lib/postgresql/8.3/main/ of server y, considering that the new target machine is running 8.3 whereas the old one ran 8.4 ? No, a dump & restore is required (as stated in the rele

Re: [GENERAL] migrating data from 8.4 to 8.3

2010-02-11 Thread Thomas Kellerer
A. Kretschmer, 11.02.2010 09:42: In response to Thomas Kellerer : Marc Lustig, 08.02.2010 11:36: Hi, can we safely put the data from /var/lib/postgresql/8.4/main/ of server x to /var/lib/postgresql/8.3/main/ of server y, considering that the new target machine is running 8.3 whereas the old

Re: [GENERAL] How can I get the English version?

2010-02-19 Thread Thomas Kellerer
Nils Gösche wrote on 19.02.2010 23:29: Hi! I am running PostgreSQL on a German Windows machine. Client programs like psql and pgAdmin are printing German translation strings everywhere, even though I told the installer to use English/United States locale. How can I disable all translations and s

Re: [GENERAL] How can I get the English version?

2010-02-19 Thread Thomas Kellerer
Nils Gösche wrote on 20.02.2010 00:20: set LC_MESSAGES=English Yes, that works very well for psql, thanks! However, pgAdmin is still in German. Any other trick? File -> Options -> User Language -> English works for me Thomas -- Sent via pgsql-general mailing list (pgsql-general@postgresq

Re: [GENERAL] Procedures

2010-02-20 Thread Thomas Kellerer
Nilesh Govindarajan wrote on 20.02.2010 14:08: On 02/20/2010 02:32 PM, John R Pierce wrote: Nilesh Govindarajan wrote: How do I create a procedure using plpgsql cursors to print the output of the query in the cursor (using for loop) ? In all docs I found, it seems to be a must to return data t

Re: [GENERAL] Procedures

2010-02-20 Thread Thomas Kellerer
Nilesh Govindarajan wrote on 20.02.2010 14:28: Okay here's my query - select c.cid, c.subject, n.title from comments c, node n where c.nid = n.nid and c.status != 0; This is the query to check list of comments requiring admin approval and also the article titles on which this is posted. I want

Re: [GENERAL] Performance comparison

2010-02-25 Thread Thomas Kellerer
Greg Smith, 25.02.2010 03:13: Martijn van Oosterhout wrote: I remember a while back someone posted a graphs showing a scalability of postgresql for various versions (I think 8.0 to 8.4). I've tried to find this image again but havn't been able to locate it. Does anyone here remember? http://su

Re: [GENERAL] Performance comparison

2010-02-25 Thread Thomas Kellerer
Greg Smith, 25.02.2010 17:47: Based on tests showing a similar style and magnitude regression at Sun by Jignesh Shah, I would assume this is mainly because some of the starting parameter changes in 8.4 detuned this particular benchmark a bit, in favor of proving a better default for real-world us

Re: [GENERAL] FSM and VM file

2010-03-02 Thread Thomas Kellerer
akp geek wrote on 02.03.2010 22:11: Hi all - There are lot of FSM and VM files getting generated in the base directory. Do we need these files and I don't know the reason why these files are getting generated. I read the documentation, but not able to follow well. I will read it ag

[GENERAL] Not all functions in schema pg_catalog are "visible"

2010-03-02 Thread Thomas Kellerer
Hi, I just noticed that that there are functions defined (such as pg_catalog.time(timestamp) that can only be called when prefixed with pg_catalog. However other functions (that are at first glance defined identically to time()) can be called without prefixing them with pg_catalog. My underst

Re: [GENERAL] Is there any oracle user_source table equivalent in postgre?

2010-03-05 Thread Thomas Kellerer
venkatra...@tcs.com, 05.03.2010 12:40: Hello, Can any one help me if oracle like any user_source table is there in postgre 8.4 (in pg_catalog or information_schema). Actually we migrated code from Oracle to Postgre. Now i want to search in how many places( i.e. in functions ) we have used a par

[GENERAL] Re: [NOVICE] Is there any oracle user_source table equivalent in postgre?

2010-03-05 Thread Thomas Kellerer
venkatra...@tcs.com, 05.03.2010 13:04: Thanks Thomas for your reply. when i am trying - select * from pg_catalog.pg_proc.prosrc You have to use: SELECT prosrc FROM pg_catalog.pg_proc Thomas -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your su

Re: [GENERAL] timestamp literal out of line

2010-03-07 Thread Thomas Kellerer
Tom Lane wrote on 07.03.2010 16:34: We wouldn't even support it at all because it's so syntactically messy and inextensible I like it :) It's the only cross-DBMS way to write down a date or timestamp literal. Thomas -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To m

[GENERAL] \copy command: how to define a tab character as the delimiter

2010-03-09 Thread Thomas Kellerer
Hi, I tried to import a text file using the \copy command in psql using the following: \copy foo (foo, bar) from foobar.txt delimiter as '\t' csv header but that gives me an error: ERROR: COPY delimiter must be a single one-byte character So how can I specify a tab character if I also need

Re: [GENERAL] \copy command: how to define a tab character as the delimiter

2010-03-09 Thread Thomas Kellerer
Tom Lane wrote on 09.03.2010 18:21: Thomas Kellerer writes: \copy foo (foo, bar) from foobar.txt delimiter as '\t' csv header So how can I specify a tab character if I also need to specify that my file has a header line? Type an actual tab. Blush That easy? Tha

Re: [GENERAL] \copy command: how to define a tab character as the delimiter

2010-03-09 Thread Thomas Kellerer
Raymond O'Donnell wrote on 09.03.2010 18:39: This is Postgres you're talking about - of course it's that easy! :-) :) The main reason I asked, was that the manual actually claims that '\t' can be used ("The following special backslash sequences are recognized by COPY FROM") As this is part o

[GENERAL] Re: Is there any easy way to determine a default value specified for table column?

2010-03-14 Thread Thomas Kellerer
Belka Lambda wrote on 14.03.2010 01:24: Hi everyone! Is there a way to "nicely" determine a default value of a table column? A function, which could be used, like: The defaults are store in pg_attrdef, the corresponding column definitions in pg_attribute. So you would need to do a join betw

Re: [GENERAL] "1-Click" installer problems

2010-04-01 Thread Thomas Kellerer
Nikhil G. Daddikar, 01.04.2010 08:04: In about 30 seconds I found the following unanswered threads relating to installation on Windows Vista. If anybody is interested I can find more. The problem with this kind of statistics is that you will only find people who complain, you'll never find pe

Re: [GENERAL] "1-Click" installer problems

2010-04-01 Thread Thomas Kellerer
Craig Ringer, 01.04.2010 09:24: I do not like the installer's suggestion to put the data directory into c:\Program Files either, I think this should default to %APPDATA% That seems fairly sensible *IF* it checks very carefully to make sure the postgresql user does not have a roaming profile, ie

Re: [GENERAL] "1-Click" installer problems

2010-04-01 Thread Thomas Kellerer
Magnus Hagander, 01.04.2010 11:50: 2010/4/1 Craig Ringer: instead of %ProgramFile%. I bet half of the problems would go away if the installer refused to put the data directory into c:\Program Files. Yep - it's not a clever place to put it. IIRC, that was modeled on where Microsofts own SQL S

Re: [GENERAL] Where to configure pg_xlog file-size?

2010-04-12 Thread Thomas Kellerer
Clemens Eisserer wrote on 12.04.2010 23:25: Hi, I am using postgres-8.3 on an embedded ARM9 system. Works pretty well, except for stoarge consumptions. The actual table data is rather small, but postgres creates 2 16mb files in pg_xlog: r...@mesrv:/var/lib/postgresql/8.3/main# ls -la pg_xlog/ t

[GENERAL] PostGIS in a commercial project

2011-10-21 Thread Thomas Kellerer
Hello, we are using PostgreSQL in our projects and would like to integrate PostGIS as well. Now PostGIS is licensed under the GPL and I wonder if we can use it in a commercial (customer specific) project then. The source code will not be made open source, but of course the customer will get t

Re: [GENERAL] adding a column takes FOREVER!

2011-10-22 Thread Thomas Kellerer
Tom Lane wrote on 22.10.2011 05:24: I'm thinking there is something you haven't told us about that creates a great deal of overhead for updates on this table. Lots and lots o' indexes? Lots and lots o' foreign key references? Why would an add column need to check foreign key references? --

Re: [GENERAL] PostGIS in a commercial project

2011-10-24 Thread Thomas Kellerer
Eduardo Morras, 21.10.2011 20:53: Now PostGIS is licensed under the GPL and I wonder if we can use it in a commercial (customer specific) project then. The source code will not be made open source, but of course the customer will get the source code. Is it still OK to use the GPL licensed PostGI

Re: [GENERAL] PostGIS in a commercial project

2011-10-24 Thread Thomas Kellerer
Pavel Stehule wrote on 24.10.2011 12:19: there is not clean who is customer and what is one unit. If you distribute PostGIS inside your application as one unit to customer, then your application should to use GPL. So if we only distribute our application and require the customer to install Pos

Re: [GENERAL] PostGIS in a commercial project

2011-10-24 Thread Thomas Kellerer
Tomas Vondra wrote on 24.10.2011 20:11: On 24 Říjen 2011, 19:44, Thomas Kellerer wrote: Pavel Stehule wrote on 24.10.2011 12:19: there is not clean who is customer and what is one unit. If you distribute PostGIS inside your application as one unit to customer, then your application should to

Re: [GENERAL] PostGIS in a commercial project

2011-10-25 Thread Thomas Kellerer
Mark Cave-Ayland, 25.10.2011 12:51: As Robert has suggested, you have misunderstood the GPL license - if you make changes to the *PostGIS* source code AND you distribute the modified code to your customer (rather than offering a managed service), you would need to make the changes available to yo

[GENERAL] "Named" column default expression

2011-10-28 Thread Thomas Kellerer
Hello, I just noticed that Postgres allows the following syntax: create table foo ( id integer constraint id_default_value default 42 ); But as far as I can tell the "constraint id_default_value" part seems to be only syntactical sugar as this is stored nowhere. At least I couldn't find it

Re: [GENERAL] "Named" column default expression

2011-10-28 Thread Thomas Kellerer
Thom Brown, 28.10.2011 10:10: On 28 October 2011 08:29, Thomas Kellerer wrote: Hello, I just noticed that Postgres allows the following syntax: create table foo ( id integer constraint id_default_value default 42 ); But as far as I can tell the "constraint id_default_value"

Re: [GENERAL] PostgreSQL Naming Rules

2011-10-28 Thread Thomas Kellerer
Robert Buckley, 28.10.2011 12:49: according to this article http://www.informit.com/articles/article.aspx?p=409471, the naming of tables, and fields is restricted to 63 characters and must start with an underscore or letter. Nothing is however said about in which character set. Am I allowed to n

Re: [GENERAL] "Named" column default expression

2011-10-28 Thread Thomas Kellerer
Tom Lane wrote on 28.10.2011 16:21: I just noticed that Postgres allows the following syntax: create table foo ( id integer constraint id_default_value default 42 ); I'm wondering why this doesn't throw an error then. It's an implementation artifact --- our grammar regards everything after a

Re: [GENERAL] count (DISTINCT field) OVER ()

2011-11-10 Thread Thomas Kellerer
Tarlika Elisabeth Schmitz, 10.11.2011 00:52: I would like to implement the equivalent of "count (DISTINCT field) OVER ()": SELECT id, name, similarity(name, 'Tooneyvara') as delta, count (id) OVER() AS cnt FROM vtown WHERE similarity(name, 'Tooneyvara')> 0.1 ORDER BY del

Re: [GENERAL] count (DISTINCT field) OVER ()

2011-11-10 Thread Thomas Kellerer
Tarlika Elisabeth Schmitz, 10.11.2011 11:24: SELECT id, name, delta, sum(case when rn = 1 then rn else null end) over() as distinct_id_count FROM ( SELECT id, name, similarity(name, 'Tooneyvara') as delta, row_number() OVER(partition by id) AS rn

[GENERAL] Re: plpgsql, I have a solution, want to see if there is a cleaner/better one. Taking vertical list and comma separating it onto a row

2011-11-10 Thread Thomas Kellerer
Henry Drexler, 10.11.2011 14:22: I am thinking there is a better/simpler way, though this is what I have working: (postgres 9.1) I would like to have the list of colors for each type of clothing to be comma seperated in the end result. like this: typeorganized_by_type pants red,

Re: [GENERAL] how to drop function?

2011-11-16 Thread Thomas Kellerer
Ivan Sergio Borgonovo, 16.11.2011 01:01: test=# begin; create or replace function process_table ( action TEXT, v_table_name varchar(100) ) RETURNS BOOLEAN AS $$ DECLARE BEGIN return true; END; $$ LANGUAGE plpgsql; drop function process_table ( action TEXT, v_table_nam

Re: [GENERAL] Selective backup script

2011-11-21 Thread Thomas Kellerer
Mike Blackwell, 21.11.2011 17:50: I've seen a couple backup scripts that query the metadata to determine the list of databases to back up. I like this approach, but have a few databases which don't get backed up for various reasons, e.g. testing databases which we'd prefer to recreate on the off

Re: [GENERAL] Way to create unique constraint in Postgres even with null columns

2011-11-27 Thread Thomas Kellerer
Mike Christensen wrote on 27.11.2011 22:18: I have a table with this layout: CREATE TABLE Favorites ( FavoriteId uuid NOT NULL, --Primary key UserId uuid NOT NULL, RecipeId uuid NOT NULL, MenuId uuid ) I want to create a unique constraint similar to th

Re: [GENERAL] Way to create unique constraint in Postgres even with null columns

2011-11-27 Thread Thomas Kellerer
David Johnston wrote on 27.11.2011 23:18: Also, the index example above presumes you want RecipeId to be "Null-able" as opposed to MenuId as described in your original post. Well of course that was a typo in my answer, it should have been: CREATE UNIQUE INDEX Favorites_UniqueFavorite ON

[GENERAL] Detecting uncommitted changes

2011-12-27 Thread Thomas Kellerer
Hi, is there a way I can detect if the current session has any uncommitted changes? I'm not trying to find uncommitted changes from other sessions (connections) only for the *current* one. I thought there was a discussion on the mailing list that involved the txid_XXX functions, but I couldn'

Re: [GENERAL] Detecting uncommitted changes

2011-12-27 Thread Thomas Kellerer
Bill Moran wrote on 27.12.2011 19:37: is there a way I can detect if the current session has any uncommitted changes? I'm not trying to find uncommitted changes from other sessions (connections) only for the *current* one. I thought there was a discussion on the mailing list that involved the

Re: [GENERAL] Detecting uncommitted changes

2011-12-27 Thread Thomas Kellerer
Tom Lane wrote on 27.12.2011 20:22: If I'm understanding you correctly, you could just make it check the transaction status. If there's an active transaction, then there are "uncommitted changes". Sounds like what I want, but how do I check the "transaction status" (I'm using JDBC) More sp

Re: [GENERAL] Detecting uncommitted changes

2011-12-28 Thread Thomas Kellerer
Tom Lane wrote on 28.12.2011 01:41: Thomas Kellerer writes: Tom Lane wrote on 27.12.2011 20:22: More specifically, look to see if the current transaction has assigned itself a transaction ID. I think the easiest place to see this is in pg_locks --- it will be holding exclusive lock on a

[GENERAL] Re: Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues

2012-01-08 Thread Thomas Kellerer
Stefan Keller wrote on 06.01.2012 19:04: I maintain images (from Webcams). In the Java and Hibernate (JPA) code I specified a @Lob annotation on class MyData and a attribte/data type "byte[] mydata;". Hibernate then generates two tables in PostgreSQL, one called MyData with a column mydata of typ

[GENERAL] Re: Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues

2012-01-08 Thread Thomas Kellerer
Stefan Keller wrote on 08.01.2012 19:13: I think you are better off using bytea unless you need to access only parts of the blob regularly. That's a valid tip. But it's to the current JDBC implementation to take action because it currently leads to disk space leakage when using JDBC and JPA/Hib

[GENERAL] Re: Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues

2012-01-08 Thread Thomas Kellerer
Stefan Keller wrote on 08.01.2012 20:35: 2012/1/8 Thomas Kellerer: What's the reason for you to stick with LargeObjects? I simply used the @Lob annotation in Hibernate/JPA. That's all to get a leaking pg_largeobject table. See http://relation.to/Bloggers/PostgreSQLAndBL

Re: [GENERAL] Don't Thread On Me (PostgreSQL related)

2012-01-26 Thread Thomas Kellerer
Rodrigo E. De León Plicet wrote on 26.01.2012 22:52: Oracle claims it for releases going back to 7 Not true. Quote from the Oracle concepts manual: "Multiple-process Oracle (also called multiuser Oracle) uses several processes to run different parts of the Oracle Database code and additional

Re: [GENERAL] Triggering a function on table overwrite

2012-02-06 Thread Thomas Kellerer
Misa Simic, 06.02.2012 10:35: Hi Bob, I guess with "overwrite the table" you mean to fill some columns with your values in trigger... If that is the case, in docs is example: http://www.postgresql.org/docs/8.1/static/plpgsql-trigger.html Kind Regards, Please do not link to outdated docume

Re: [GENERAL] How to store variable data in a field?

2012-02-21 Thread Thomas Kellerer
Andre Lopes, 21.02.2012 16:11: Hi all, I need to create a table to store Twitter accounts information, Facebook and other social networks details for API login. I need to know if it is possible to store the account details("account_details" field) in a field that contains something like an array

Re: [GENERAL] Single postgres for Multiple application

2012-03-10 Thread Thomas Kellerer
Twaha Daudi wrote on 10.03.2012 10:32: Hello all, Good day. I have installed postgres 8.4 on ubuntu 11.10 desktop.My interest is to test three web-based application.One is drupal7.the other two still working on it.There should be possibility of data transaction between them.The two web based will

Re: [GENERAL] Call for Google Summer of Code (GSoC) 2012: Project ideas?

2012-03-14 Thread Thomas Kellerer
Stefan Keller, 08.03.2012 20:40: Hi I do have a student who is interested in participating at the Google Summer of Code (GSoC) 2012 Now I have the "burden" to look for a cool project... Any ideas? -Stefan What about an extension to the CREATE TRIGGER syntax that combines trigger definition

Re: [GENERAL] POSTGRESQL Newbie

2012-03-21 Thread Thomas Kellerer
Marti Raudsepp, 21.03.2012 12:35: E.g. VACUUM/ANALYZE needed to be ran manually and it used to take an *exclusive* lock on tables, for longish periods, preventing any queries! Failure to vacuum would cause the files to bloat without limit and slow down your queries gradually. In the worst case, y

Re: [GENERAL] group by does not show error

2012-03-24 Thread Thomas Kellerer
AI Rumman wrote on 24.03.2012 09:06: I am using Postgresql 9.1.0. I found that following GROUP BY query works in my DB :- \d t1 Table "public.t1" Column | Type | Modifiers +-+--- i | integer | not null nam| text| Indexes: "t1_pkey" PRIMAR

Re: [GENERAL] Problem with installation

2012-03-27 Thread Thomas Kellerer
niss...@wp.pl, 27.03.2012 10:46: Hi, I need to install PostgreSQL 9 but in silence mode (like in MSI Installer for Postgres 8.3). Is it possible with PostgreSQL 9.0 or higher? Why not use the binary ZIP distribution? Steps for installing are then: 1) Unzip the archive 2) Run initdb 3) Run

Re: [GENERAL] Managing two sets of data in one database

2012-03-29 Thread Thomas Kellerer
Jonathan Bartlett wrote on 29.03.2012 22:39: Your suggestion gives me an idea, and I'd like your opinion since I haven't done much with schemas. (1) Separate the datasets into different schemas (2) Use different schema names for different static data releases (3) For the *company*, we can use a

Re: [GENERAL] views, queries, and locks

2012-04-03 Thread Thomas Kellerer
Jon Nelson wrote on 03.04.2012 19:01: I also update this view with CREATE OR REPLACE VIEW every 15-30 minutes That is a highly questionable approach. What real problem are you trying to solve with that? Maybe there is a better solution that does not require changing the view. -- Sent via p

Re: [GENERAL] views, queries, and locks

2012-04-03 Thread Thomas Kellerer
Jon Nelson wrote on 03.04.2012 20:41: Close, but not quite. It's not rotation but every N minutes a newly-built table appears. I'd like that table to appear as part of the view as soon as possible. Can't you use table inheritance for that? -- Sent via pgsql-general mailing list (pgsql-gener

Re: [GENERAL] views, queries, and locks

2012-04-04 Thread Thomas Kellerer
Jon Nelson wrote on 04.04.2012 15:50: I need to have something table-like from the client's perspective for a bunch of reasons. For now, assume that I want to keep using the view and that I'd like to find better ways to address my concerns. What about a set-returning function that builds the qu

Re: [GENERAL] views, queries, and locks

2012-04-04 Thread Thomas Kellerer
Jon Nelson wrote on 04.04.2012 19:47: What about a set-returning function that builds the query dynamically and wrapping that into a view? That way the view would never change and client would still have the perspective of a view/table Your function could pick up the changes automatically e.g.

Re: [GENERAL] recommended schema diff tools?

2012-04-12 Thread Thomas Kellerer
Chris Angelico wrote on 12.04.2012 17:10: patchlevel = query("select patchlevel from config") switch (patchlevel) { default: print("Unknown patch level!"); break; case 1: print("20120216: Adding Foobar columns to Quux") query("ALTER TABLE Quux ADD foo smallint not null default 0,

Re: [GENERAL] recommended schema diff tools?

2012-04-12 Thread Thomas Kellerer
Welty, Richard wrote on 12.04.2012 16:57: can anyone recommend an open source tool for diffing schemas? (it should go without saying that i'm looking for ddl to update production and QA DBs from development DBs, but i'll say it, just in case.) You might want to have a look at SQL Workbench/J.

Re: [GENERAL] how to make an SQL UPDATE from record returning function

2012-04-24 Thread Thomas Kellerer
Rafal Pietrak, 24.04.2012 09:02: Hi all, Recently I have fell onto a multicolumn update problem, earlier discussed here: http://postgresql.1045698.n5.nabble.com/UPDATE-of-several-columns-using-SELECT-statement-td1916045.html But in my case, subselect does not help, since in my case, new values

Re: [GENERAL] how to amend SQL standard to add comments?

2012-05-06 Thread Thomas Kellerer
Aleksey Tsalolikhin wrote on 06.05.2012 19:24: Situation: When a system administrator or database administrator looks at a gnarly SQL query chewing up system resources, there is no way to tell by looking at the query server-side which application it came from, what its purpose is, and who the au

Re: [GENERAL] quit milis

2008-12-10 Thread Thomas Kellerer
Tonny Sapri, 10.12.2008 09:12: I want quit milis postgresql. What are quit milis? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Logg errors during UPDATE

2008-12-12 Thread Thomas Kellerer
Hi, with Oracle I have the ability to tell the system to log errors during a long transaction into a separate table and proceed with the statement. This is quite handy when updating large tables and the update for one out of a million rows fails. The syntax is something like this: UPDATE LOG

[GENERAL] A bit confused about Postgres Plus

2008-12-17 Thread Thomas Kellerer
Hi, as the Enterprise DB distribution ("One Click Installer") seems to be the recommendation from the Postgres team for a binary download, I wonder what the exact difference between Postgres and Postgres Plus is. I can't find a direct comparison ("feature matrix") of the three EnterpriseDB off

Re: [GENERAL] A bit confused about Postgres Plus

2008-12-17 Thread Thomas Kellerer
Alvaro Herrera wrote on 17.12.2008 13:28: > Thomas Kellerer wrote: > >> as the Enterprise DB distribution ("One Click Installer") seems to be >> the recommendation from the Postgres team for a binary download, I >> wonder what the exact difference betwee

Re: [GENERAL] A bit confused about Postgres Plus

2008-12-17 Thread Thomas Kellerer
Hi Dave, Dave Page, 17.12.2008 11:05: These are really questions for us (EnterpriseDB rather than pgsql-general) - especially as none of the pricing or support pages are linked directly from postgresql.org. Yes, partially :) But then the upgrade path from Postgres to the Advanced Server is a

[GENERAL] How are locks managed in PG?

2008-12-19 Thread Thomas Kellerer
Hi, I have a question on how PG manages lock information. Does this go through a central "lock manager" that manages the information which row is locked by which transactioni. Or is the lock information stored directly within the data blocks (so no central "data structure" would be needed)

Re: [GENERAL] How are locks managed in PG?

2008-12-19 Thread Thomas Kellerer
postgresql.org/docs/8.3/interactive/mvcc.html). If you explicity require table and row level locking the above link will provide answers on these too. Allan. On Fri, Dec 19, 2008 at 10:32 AM, Thomas Kellerer wrote: Hi, I have a question on how PG manages lock information. Does this go through a

Re: [GENERAL] How are locks managed in PG?

2008-12-19 Thread Thomas Kellerer
Alvaro Herrera, 19.12.2008 13:49: We use an in-memory lock manager for table- and page-level locks. For shared tuple locks, they are spilled to disk on an ad-hoc storage system (pg_multixact) when there is more than one shared locker. (Exclusive locks and single locker shared locks are stored d

Re: [GENERAL] PostgreSQL 8.4 download?

2009-01-04 Thread Thomas Kellerer
Craig Ringer wrote on 20.11.2008 12:12: There's a daily snapshot available for download off the main dl tree. Go to the download page and look for the link to browse the mirrors directly. Pick on and look for snapshot. You get to compile it yourself, but it's pretty easy to do. ... on a UNIX/

Re: [GENERAL] Is this on the to-do list?

2009-01-18 Thread Thomas Kellerer
A B wrote on 18.01.2009 22:43: From the docs: http://www.postgresql.org/docs/8.3/interactive/sql-update.html "According to the standard, the column-list syntax should allow a list of columns to be assigned from a single row-valued expression, such as a sub-select: UPDATE accounts SET (contact_l

[GENERAL] Problem defining deferred check constraints

2009-01-25 Thread Thomas Kellerer
Hi, I'm playing around with deferred constraints and according to the manual, it should be possible to declare a check constraint as deferred. At least that's how I read the definition of /column_constraint/ at http://www.postgresql.org/docs/8.3/static/sql-createtable.html What I tried: CR

Re: [GENERAL] autovacuum daemon

2009-01-25 Thread Thomas Kellerer
Abdul Rahman wrote on 22.01.2009 07:06: Now, kindly let me know the detail about the solution send by Ray, i.e. ps ax | grep postgres For WindowsXP the above command can be written as: tasklist /v /fi "imagename eq postgres.exe" Thomas -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Resp.: Problem defining deferred check constraints

2009-01-25 Thread Thomas Kellerer
Osvaldo Kussama wrote on 25.01.2009 15:24: See the manual: http://www.postgresql.org/docs/current/interactive/sql-createtable.html "DEFERRABLE NOT DEFERRABLE This controls whether the constraint can be deferred. A constraint that is not deferrable will be checked immediately after every comm

Re: [GENERAL] autovacuum daemon

2009-01-25 Thread Thomas Kellerer
Raymond O'Donnell wrote on 25.01.2009 19:28: For WindowsXP the above command can be written as: tasklist /v /fi "imagename eq postgres.exe" Cool! I didn't know that one. Must R some more FMs :-) No need for manuals :) Just enter "takslist /?" Regards Thomas -- Sent via pgsql-general

Re: [GENERAL] Pet Peeves

2009-02-01 Thread Thomas Kellerer
Grzegorz Jaśkiewicz wrote on 01.02.2009 13:13: probably enabling triggers for views would be the only way to do it, me thinks. I don't know how oracle guys got around it. Oracle *does* have (INSTEAD OF) triggers on views. (and "simple" views are automatically updateable anyway) Regards Thomas

[GENERAL] Warm Standby question

2009-02-01 Thread Thomas Kellerer
Hi, (Note: I have never used log shipping before, I'm just interested in the concepts, so I'm might be missing a very important aspect) I was reading the blog entry about HA and warm standby: http://scale-out-blog.blogspot.com/2009/02/simple-ha-with-postgresql-point-in-time.html The image tha

Re: [GENERAL] Warm Standby question

2009-02-02 Thread Thomas Kellerer
@postgresql.org] On Behalf Of Thomas Kellerer Sent: Sunday, February 01, 2009 7:47 AM To: pgsql-general@postgresql.org Subject: [GENERAL] Warm Standby question Hi, (Note: I have never used log shipping before, I'm just interested in the concepts, so I'm might be missing a very importa

Re: [GENERAL] getting column value length

2009-02-03 Thread Thomas Kellerer
blackwater dev wrote on 04.02.2009 00:44: I need to return all rows in a table where one of the columns 'name' is 37+ characters. In postgres, is there a function to get the length of the columns contents? Check out char_length() http://www.postgresql.org/docs/8.3/static/functions-string.htm

<    2   3   4   5   6   7   8   9   >