Re: [GENERAL] Array to IN or UNION

2009-02-26 Thread Richard Huxton
Jordi Romagos wrote: > I'm doing a procedure and I'm trying to pass a dynamic array into a CURSOR, > I found the sentence ANY but it's really slow. Is there any way to convert > all the elements in this array to IN condition or one select with unions? > For example, I've got a feeling that recent

[GENERAL] PostgreSQL to Oracle

2009-02-26 Thread Abdul Rahman
Hi All, I want to migrate from PostgreSQL to Oracle and need any tool preferably open source. And I am specially concerned with stored procedures / functions. Regards, Abdul Rehman.

Re: [GENERAL] Connection refused (0x0000274D/10061).

2009-02-26 Thread Ashish Karalkar
najmuddin hassan wrote: Hi, I just installed a program called moteview by crossbow technologies. It uses postgreSQL 8.0.0-rc1 for its database. There is something wrong as when I launched the program it automaticly gives me an error that the database is not available. The postgreSQL database

Re: [GENERAL] Getting time-dependent load statistics

2009-02-26 Thread Ashish Karalkar
Torsten Bronger wrote: Hallöchen! Yesterday I ported a web app to PG. Every 10 minutes, a cron job scanned the log files of MySQL and generated a plot showing the queries/sec for the last 24h. (Admittedly queries/sec is not the holy grail of DB statistics.) But I still like to have something

[GENERAL] Kerberos V5 required for PostgreSQL installation on Windows

2009-02-26 Thread Dann Corbit
If Kerberos V5 is not installed on a Windows platform, the following error dialog is returned upon attempted installation: Posgres.exe - Unable to Locate Component This application has failed to start because krb5_32.dll was not found. Re-installing the application may fix this problem. [OK] --

Re: [GENERAL] funny view/temp table problem with query

2009-02-26 Thread Scott Marlowe
On Thu, Feb 26, 2009 at 3:02 AM, Grzegorz Jaśkiewicz wrote: > First of all, I wonder why the same query divided up in half - and > using temporary table works as expected, and with everything together I'm betting it's your use of generate_series(). You can get some weird side effects because it

Re: [GENERAL] overlaps behaviour - ('2006-03-01'::TimeStamp, '2007-12-01'::TimeStamp) overlaps ('2007-12-01'::TimeStamp, 'Infinity'::TimeStamp)

2009-02-26 Thread Adrian Klaver
On Monday 23 February 2009 8:10:34 am Marek Lewczuk wrote: > Hello, > I can't find SQL definition for OVERLAPS operator so I don't know > whether following expression's result (false) is appropriate > behaviour: > select ('2006-03-01'::TimeStamp, '2007-12-01'::TimeStamp) overlaps > ('2007-12-01'::T

Re: [GENERAL] funny view/temp table problem with query

2009-02-26 Thread Joshua D. Drake
On Fri, 2009-02-27 at 01:36 +0100, Alban Hertroys wrote: > On Feb 26, 2009, at 11:02 AM, Grzegorz Jaśkiewicz wrote: > You're the one who's asking a question, it's your responsibility that > we can understand your problem. Woah... ease up cowboy. Joshua D. Drake -- PostgreSQL - XMPP: jdr...

Re: [GENERAL] funny view/temp table problem with query

2009-02-26 Thread Alban Hertroys
On Feb 26, 2009, at 11:02 AM, Grzegorz Jaśkiewicz wrote: looks like you completely misunderstood my question. I'm not surprised. What do you expect with random capitalisation, random table alias names and random indentation combined with queries getting wrapped by the mailing-list software

Re: [GENERAL] speaking of 8.4...

2009-02-26 Thread Joshua D. Drake
On Thu, 2009-02-26 at 15:41 -0800, Ron Mayer wrote: > Back in Jan 2008 that same page stated that 8.3 "would" come out > in July 2007: > http://archives.postgresql.org/pgsql-advocacy/2008-01/msg00235.php > > But that's not nearly as sad as the Chinese FAQs that state that > the latest version of

Re: [GENERAL] Connection refused (0x0000274D/10061).

2009-02-26 Thread Adrian Klaver
On Thursday 26 February 2009 2:44:10 pm Scott Marlowe wrote: > > > I seriously doubt it's anything more than postgresql.conf and > pg_hba.conf settings that's keep him out. While it's possible they've > built a custom database with all kinds of fancy UDFs and all, I kinda > doubt anyone with the b

Re: [GENERAL] speaking of 8.4...

2009-02-26 Thread Ron Mayer
Joshua D. Drake wrote: > On Thu, 2009-02-26 at 15:27 -0800, Ron Mayer wrote: >> Joshua D. Drake wrote: >>> On Fri, 2009-02-27 at 10:19 +1300, Tim Uckun wrote: 8.4 was scheduled to be released march 1. ... >> >> I do notice that the Press FAQ with it's Q4 2008 guess >> is even more optimi

Re: [GENERAL] Connection refused (0x0000274D/10061).

2009-02-26 Thread Scott Marlowe
Oh yeah, and I fully expect this product to fail to work with 8.3 due to issues with the removed automatic conversions of types there. I'm sure it's chock full of: substring(datefield,12,6) to grab some part of a date stamp and such. -- Sent via pgsql-general mailing list (pgsql-general@postgre

Re: [GENERAL] Connection refused (0x0000274D/10061).

2009-02-26 Thread Scott Marlowe
On Thu, Feb 26, 2009 at 4:16 PM, Tom Lane wrote: > Scott Marlowe writes: >> 8.0 is definitely supported.  8.0.0-rc1 is NOT supported, as it was a >> release candidate and is quite likely to have some nasty bugs in it. > > It's worse than that: he's running on Windows, which means that this > is n

Re: [GENERAL] speaking of 8.4...

2009-02-26 Thread Joshua D. Drake
On Thu, 2009-02-26 at 15:27 -0800, Ron Mayer wrote: > Joshua D. Drake wrote: > > On Fri, 2009-02-27 at 10:19 +1300, Tim Uckun wrote: > >> > >> [according to some page on the web site...] > >> 8.4 was scheduled to be released march 1. Do we know what the > > All schedules are subject to ch

Re: [GENERAL] Connection refused (0x0000274D/10061).

2009-02-26 Thread Joshua D. Drake
On Thu, 2009-02-26 at 18:16 -0500, Tom Lane wrote: > Scott Marlowe writes: > > 8.0 is definitely supported. 8.0.0-rc1 is NOT supported, as it was a > > release candidate and is quite likely to have some nasty bugs in it. > > It's worse than that: he's running on Windows, which means that this >

[GENERAL] Question about no unchanging update rule + ALTER

2009-02-26 Thread Josh Trutwin
I found the following on a blog post (http://www.depesz.com/index.php/2007/09/08/avoiding-empty-updates/) which had a rule to prevent empty updates: CREATE RULE no_unchanging_updates AS ON UPDATE TO test_table WHERE ROW(OLD.*) IS NOT DISTINCT FROM ROW(NEW.*) DO INSTEAD NOTHING; Works great, but p

Re: [GENERAL] speaking of 8.4...

2009-02-26 Thread Ron Mayer
Joshua D. Drake wrote: > On Fri, 2009-02-27 at 10:19 +1300, Tim Uckun wrote: >> >> [according to some page on the web site...] >> 8.4 was scheduled to be released march 1. Do we know what the > All schedules are subject to change within the community :) >> tentative date of release is?

Re: [GENERAL] Connection refused (0x0000274D/10061).

2009-02-26 Thread Tom Lane
Scott Marlowe writes: > 8.0 is definitely supported. 8.0.0-rc1 is NOT supported, as it was a > release candidate and is quite likely to have some nasty bugs in it. It's worse than that: he's running on Windows, which means that this is not just any rc version, but an rc for the first native Wind

Re: [GENERAL] Connection refused (0x0000274D/10061).

2009-02-26 Thread Scott Marlowe
On Thu, Feb 26, 2009 at 3:35 PM, Adrian Klaver wrote: > On Thursday 26 February 2009 1:51:10 pm Scott Marlowe wrote: >> On Thu, Feb 26, 2009 at 2:03 PM, Adrian Klaver wrote: >> > - "najmuddin hassan" wrote: >> >> Hi, >> >> >> >> I just installed a program called moteview by crossbow technolo

Re: [GENERAL] Connection refused (0x0000274D/10061).

2009-02-26 Thread Scott Marlowe
On Mon, Feb 23, 2009 at 6:11 AM, najmuddin hassan wrote: > Hi, > > I just installed a program called moteview by crossbow technologies. It uses > postgreSQL 8.0.0-rc1 for its database. There is something wrong as when I > launched the program it automaticly gives me an error that the database is >

Re: [GENERAL] Connection refused (0x0000274D/10061).

2009-02-26 Thread Adrian Klaver
On Thursday 26 February 2009 1:51:10 pm Scott Marlowe wrote: > On Thu, Feb 26, 2009 at 2:03 PM, Adrian Klaver wrote: > > - "najmuddin hassan" wrote: > >> Hi, > >> > >> I just installed a program called moteview by crossbow technologies. > >> It uses > >> postgreSQL 8.0.0-rc1 for its database.

Re: [GENERAL] [BUGS] Database/Table Owner Question

2009-02-26 Thread Kevin Grittner
>>> wrote: > We have a lot of test databases with multiple db_owners, but very few > superusers, and table_owners switch all the time. A quick, untested idea: Create a table_owner role. Create your users with NOINHERIT and GRANT table_owner to them as appropriate. REVOKE CREATE ON SCHEMA

Re: [GENERAL] Getting time-dependent load statistics

2009-02-26 Thread Torsten Bronger
Hallöchen! Torsten Bronger writes: > Yesterday I ported a web app to PG. Every 10 minutes, a cron job > scanned the log files of MySQL and generated a plot showing the > queries/sec for the last 24h. (Admittedly queries/sec is not the > holy grail of DB statistics.) > > But I still like to have

Re: [GENERAL] Connection refused (0x0000274D/10061).

2009-02-26 Thread Scott Marlowe
On Thu, Feb 26, 2009 at 2:03 PM, Adrian Klaver wrote: > - "najmuddin hassan" wrote: >> Hi, >> >> I just installed a program called moteview by crossbow technologies. >> It uses >> postgreSQL 8.0.0-rc1 for its database. There is something wrong as >> when I > > Yes 8.0 is an old version, but i

Re: [GENERAL] speaking of 8.4...

2009-02-26 Thread Joshua D. Drake
On Fri, 2009-02-27 at 10:19 +1300, Tim Uckun wrote: > > > 8.4 was scheduled to be released march 1. Do we know what the All schedules are subject to change within the community :) > tentative date of release is? When it is done of course. Joshua D. Drake -- PostgreSQL - XMPP

Re: [GENERAL] Postgresql selecting strange index for simple query

2009-02-26 Thread Tom Lane
Maxim Boguk writes: > I try simplify test case and: > Now use sequential user_id, and truncate last_change_time to date: > SELECT nextval('test_seq') as user_id,last_change_time::date > ,rpad('a',500,'b') as f1 into test_table from resume; Could you send me a dump of this test_table off-list?

Re: [GENERAL] speaking of 8.4...

2009-02-26 Thread Tim Uckun
On Wed, Feb 25, 2009 at 9:40 PM, Dave Page wrote: > On Wed, Feb 25, 2009 at 8:16 AM, Scara Maccai wrote: > > What? Hot standby won't make it in 8.4? > > Hot standby != synch-rep. > > The former is still being reviewed, though it's starting to look like > it's cutting it pretty fine for inclusion

Re: [GENERAL] Postgresql selecting strange index for simple query

2009-02-26 Thread Maxim Boguk
Tom Lane wrote: Maxim Boguk writes: So i have two theory (just waving hands ofcourse): 1)integer owerflow somewhere in cost calculation Costs are floats, and in any case you're not showing costs anywhere near the integer overflow limit... 2)floating rounding errors (because cost very close

Re: [GENERAL] Connection refused (0x0000274D/10061).

2009-02-26 Thread Adrian Klaver
- "najmuddin hassan" wrote: > Hi, > > I just installed a program called moteview by crossbow technologies. > It uses > postgreSQL 8.0.0-rc1 for its database. There is something wrong as > when I > launched the program it automaticly gives me an error that the > database is > not available.

Re: [GENERAL] Problem setting up PostgreSQL

2009-02-26 Thread Lennin Caro
--- On Wed, 2/25/09, Bill Herbert wrote: > From: Bill Herbert > Subject: [GENERAL] Problem setting up PostgreSQL > To: "pgsql-general@postgresql.org" > Date: Wednesday, February 25, 2009, 4:30 AM > Hello, > > I am attempting to install PostgreSQL. I downloaded > 8.2.12-1zip from ftp9.us.pos

Re: [GENERAL] postgresql with storage

2009-02-26 Thread Serge Fonville
> > The only meaningful benchmark is your application, all other benchmarks > only measure the performance of the benchmark. > As a benchmark you can also look into http://developer.postgresql.org/pgdocs/postgres/pgbench.html Hope this helps Regards, Serge Fonville

Re: [GENERAL] Getting time-dependent load statistics

2009-02-26 Thread Ben Chobot
On Fri, 20 Feb 2009, Torsten Bronger wrote: Hallöchen! Yesterday I ported a web app to PG. Every 10 minutes, a cron job scanned the log files of MySQL and generated a plot showing the queries/sec for the last 24h. (Admittedly queries/sec is not the holy grail of DB statistics.) But I still l

Re: [GENERAL] Off Topic: ICD-10 codes in a database table?

2009-02-26 Thread Martin Gainty
ICD10s discovered! http://www.hcup-us.ahrq.gov/toolssoftware/icd_10/dxlabel%202006.csv Thanks Steve! Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This trans

Re: [GENERAL] Postgresql selecting strange index for simple query

2009-02-26 Thread Tom Lane
Maxim Boguk writes: > So i have two theory (just waving hands ofcourse): > 1)integer owerflow somewhere in cost calculation Costs are floats, and in any case you're not showing costs anywhere near the integer overflow limit... > 2)floating rounding errors (because cost very close in wrong situat

Re: [GENERAL] Returning null for joined tables when one column non existant

2009-02-26 Thread Andreas Kretschmer
Madison Kelly wrote: > Hi all, > > I've got a query that crosses a few tables. For example: > > SELECT > a.foo, b.bar, c.baz > FROM > aaa a, bbb b, ccc c > WHERE > a.a_id=b.b_a_id AND a.a_id=c.c_a_id AND a.a_id=1; > > Obviously, if there is no match in 'bbb' or 'ccc' then nothi

Re: [GENERAL] Off Topic: ICD-10 codes in a database table?

2009-02-26 Thread Andrew Gould
On Thu, Feb 26, 2009 at 11:36 AM, Andrew Gould wrote: > On Thu, Feb 26, 2009 at 11:27 AM, Steve Atkins wrote: > >> >> On Feb 26, 2009, at 7:12 AM, Andrew Gould wrote: >> >> Background: ICD-10 is a clinical coding system maintained by the World >>> Health Organization. The system is used in mos

[GENERAL] Returning null for joined tables when one column non existant

2009-02-26 Thread Madison Kelly
Hi all, I've got a query that crosses a few tables. For example: SELECT a.foo, b.bar, c.baz FROM aaa a, bbb b, ccc c WHERE a.a_id=b.b_a_id AND a.a_id=c.c_a_id AND a.a_id=1; Obviously, if there is no match in 'bbb' or 'ccc' then nothing will be returned, even if there is a ma

Re: [GENERAL] Postgresql selecting strange index for simple query

2009-02-26 Thread Maxim Boguk
Maxim Boguk writes: Tom Lane wrote: It does know better than that. I'm wondering if the single-column index has become very bloated or something. Have you compared the physical index sizes? Table fresh loaded from dump on test server... So no index bloat for sure... As for comparing physic

Re: [GENERAL] Off Topic: ICD-10 codes in a database table?

2009-02-26 Thread Andrew Gould
On Thu, Feb 26, 2009 at 11:27 AM, Steve Atkins wrote: > > On Feb 26, 2009, at 7:12 AM, Andrew Gould wrote: > > Background: ICD-10 is a clinical coding system maintained by the World >> Health Organization. The system is used in most "advanced" countries. >> Hospitals in the USA must convert f

Re: [GENERAL] Off Topic: ICD-10 codes in a database table?

2009-02-26 Thread Steve Atkins
On Feb 26, 2009, at 7:12 AM, Andrew Gould wrote: Background: ICD-10 is a clinical coding system maintained by the World Health Organization. The system is used in most "advanced" countries. Hospitals in the USA must convert from ICD-9 to ICD-10 by 2013. Problem: I've been trying to f

Re: [GENERAL] foxpro, odbc, data types and unnecessary convertions

2009-02-26 Thread justin
Completely forgot take a look at Cursor Adapter Class, also any cursor in foxpro can be made be updateable with CURSORSETPROP( ) function removing the problem of writing Update's and Inserts Fernando Moreno wrote: Hi all, I'm using visual foxpro 9 -not my decision- for a client application

Re: [GENERAL] postgresql with storage

2009-02-26 Thread John R Pierce
Nagalingam, Karthikeyan wrote: Thanks for your information Serge Fonville, My answers are below 1.Use a hight performance storage device (as applies with all databases) The stroages are in cluster that could mean almost anything. 2. everything that uis located in the PostgreSQL datadi

[GENERAL] Array to IN or UNION

2009-02-26 Thread Jordi Romagos
I'm doing a procedure and I'm trying to pass a dynamic array into a CURSOR, I found the sentence ANY but it's really slow. Is there any way to convert all the elements in this array to IN condition or one select with unions? For example, BEGIN example CURSOR (codes integer[] ) SELECT * FRO

[GENERAL] Product Roadmap question and request for recommendation

2009-02-26 Thread Keaton Adams
What would you do in this situation? We are currently at PG 8.1 and are in the process of upgrading to 8.3.6. I read on your development roadmap page that 8.4 is slated for release in Q1 of this year, possibly on the 31st of March: “The next release of PostgreSQL is planned to be the 8.4 r

[GENERAL] Connection refused (0x0000274D/10061).

2009-02-26 Thread najmuddin hassan
Hi, I just installed a program called moteview by crossbow technologies. It uses postgreSQL 8.0.0-rc1 for its database. There is something wrong as when I launched the program it automaticly gives me an error that the database is not available. The postgreSQL database installation is bundled toget

Re: [GENERAL] Extended ability to alter column type when empty

2009-02-26 Thread David Andersen
Hi Osvaldo, Neat! Thanks a lot for your help! Regards, David On Thu, Feb 19, 2009 at 2:56 PM, Osvaldo Kussama wrote: > 2009/2/17 David Andersen : > > Hi, > > > > I am a real newbee and I hope this is the right place to post a feature > > request. > > > > I am receiving data from a csv file whe

[GENERAL] Table partitioning and query plans

2009-02-26 Thread Glen Parker
Hi all! I have set up a couple of log tables in our database to use table partitioning. So far it looks to be working pretty well, but I ran into a query plan issue that doesn't make sense to me at all. We have a table "omslog", and a set of partition tables "omslog_part_", where th

[GENERAL] overlaps behaviour - ('2006-03-01'::TimeStamp, '2007-12-01'::TimeStamp) overlaps ('2007-12-01'::TimeStamp, 'Infinity'::TimeStamp)

2009-02-26 Thread Marek Lewczuk
Hello, I can't find SQL definition for OVERLAPS operator so I don't know whether following expression's result (false) is appropriate behaviour: select ('2006-03-01'::TimeStamp, '2007-12-01'::TimeStamp) overlaps ('2007-12-01'::TimeStamp, 'Infinity'::TimeStamp) Can anyone confirm that ? In my under

[GENERAL] Problem setting up PostgreSQL

2009-02-26 Thread Bill Herbert
Hello, I am attempting to install PostgreSQL. I downloaded 8.2.12-1zip from ftp9.us.postgresql.org and then followed the installation instructions outlined in http://pginstaller.projects.postgresql.org. I am installing on a Windows XP machine with an NTFS file system. I opened the zip conten

[GENERAL] Getting time-dependent load statistics

2009-02-26 Thread Torsten Bronger
Hallöchen! Yesterday I ported a web app to PG. Every 10 minutes, a cron job scanned the log files of MySQL and generated a plot showing the queries/sec for the last 24h. (Admittedly queries/sec is not the holy grail of DB statistics.) But I still like to have something like this. At the moment

Re: [GENERAL] Postgresql selecting strange index for simple query

2009-02-26 Thread Tom Lane
Maxim Boguk writes: > Somehow postgres think index scan on singlecolumn index slower comparing to > scan on 4th field of 4column index. It does know better than that. I'm wondering if the single-column index has become very bloated or something. Have you compared the physical index sizes?

Re: [GENERAL] Postgresql selecting strange index for simple query

2009-02-26 Thread Tom Lane
Maxim Boguk writes: > Tom Lane wrote: >> It does know better than that. I'm wondering if the single-column index >> has become very bloated or something. Have you compared the physical >> index sizes? > Table fresh loaded from dump on test server... So no index bloat for sure... > As for compar

Re: [GENERAL] Off Topic: ICD-10 codes in a database table?

2009-02-26 Thread Andrew Gould
On Thu, Feb 26, 2009 at 10:06 AM, Richard Huxton wrote: > Andrew Gould wrote: > > Problem: I've been trying to find a table of ICD-10 codes to import into > a > > database; but the only listings that I can find are in publicly available > > pdf files. I've tried to copy the text to text files,

Re: [GENERAL] Postgresql selecting strange index for simple query

2009-02-26 Thread Maxim Boguk
Tom Lane wrote: Maxim Boguk writes: Somehow postgres think index scan on singlecolumn index slower comparing to scan on 4th field of 4column index. It does know better than that. I'm wondering if the single-column index has become very bloated or something. Have you compared the physical i

Re: [GENERAL] Off Topic: ICD-10 codes in a database table?

2009-02-26 Thread Richard Huxton
Andrew Gould wrote: > Problem: I've been trying to find a table of ICD-10 codes to import into a > database; but the only listings that I can find are in publicly available > pdf files. I've tried to copy the text to text files, but the resulting > layout is horrible -- it would take, literally,

[GENERAL] Postgresql selecting strange index for simple query

2009-02-26 Thread Maxim Boguk
First some details about server: hh=# select version(); version -- PostgreSQL 8.3.5 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.3.real (Debian 4.3.2-1) 4.3.2

Re: [GENERAL] Format string for ISO-8601 date and time

2009-02-26 Thread Pavel Stehule
2009/2/26 Daniel Verite : >        Pavel Stehule wrote: > >> > Is there a format string for to_char(timestamptz, text) that would > > output a >> >> > timestamp in full ISO-8601 format? That is, something like >> > 1977-04-22T01:00:00-05:00 >> > >> > I can't find a way to extract the offset against

Re: [GENERAL] foxpro, odbc, data types and unnecessary convertions

2009-02-26 Thread Justin
Fernando Moreno wrote: Hi all, I'm using visual foxpro 9 -not my decision- for a client application. Statements are writen as the typical sql string and sent through ODBC. i like foxpro  it has its quirks as do all languages.  Only concern if this is a new app Foxpro has been killed by

Re: [GENERAL] Format string for ISO-8601 date and time

2009-02-26 Thread Daniel Verite
Sam Mason wrote: 1) values of type "timestamp with time zone" are always converted to UTC (either using the timezone specified or using the session's current "timezone" value) and then when they're sent back to the value is then corrected to the session's timezone (or an expli

Re: [GENERAL] Format string for ISO-8601 date and time

2009-02-26 Thread Daniel Verite
Pavel Stehule wrote: > Is there a format string for to_char(timestamptz, text) that would output a > timestamp in full ISO-8601 format? That is, something like > 1977-04-22T01:00:00-05:00 > > I can't find a way to extract the offset against GMT from the docs here: > http://www.postg

[GENERAL] Off Topic: ICD-10 codes in a database table?

2009-02-26 Thread Andrew Gould
Background: ICD-10 is a clinical coding system maintained by the World Health Organization. The system is used in most "advanced" countries. Hospitals in the USA must convert from ICD-9 to ICD-10 by 2013. Problem: I've been trying to find a table of ICD-10 codes to import into a database; but t

Re: [GENERAL] postgresql with storage

2009-02-26 Thread Nagalingam, Karthikeyan
Thanks for your information Serge Fonville, My answers are below 1.Use a hight performance storage device (as applies with all databases) The stroages are in cluster 2. everything that uis located in the PostgreSQL datadirectory can be located on any device you prefer as long as the availabi

Re: [GENERAL] Format string for ISO-8601 date and time

2009-02-26 Thread Sam Mason
On Thu, Feb 26, 2009 at 10:50:18AM +0100, Daniel Verite wrote: > Is there a format string for to_char(timestamptz, text) that would > output a timestamp in full ISO-8601 format? That is, something like > 1977-04-22T01:00:00-05:00 If I'm understanding correctly, that's a bit awkward to do. PG on

Re: [GENERAL] Restore DB

2009-02-26 Thread Scott Marlowe
On Wed, Feb 25, 2009 at 6:54 AM, Shahbaz A. Tyagi wrote: > We took using PgAdminIII right click action. And it generated .backup files. > > However while restoring whole machine is getting hanged for unlimited time. > So just checking do we have some other way also, as we have complete Postgre > d

Re: [GENERAL] Can I use a query with UPDATE on its SET?

2009-02-26 Thread Sam Mason
On Thu, Feb 26, 2009 at 02:15:49AM -0800, Eus wrote: > Is it possible to eliminate the use of `fieldname' completely? > So, I just need to type `UPDATE table SET (SELECT ...) WHERE primary_key'. > > I think this should be possible because if the subquery in the SET > clause returns the same number

Re: [GENERAL] postgresql with storage

2009-02-26 Thread Serge Fonville
Hi, Not entirely sure what you mean, but here goes 1.Use a hight performance storage device (as applies with all databases) 2. everything that uis located in the PostgreSQL datadirectory can be located on any device you prefer as long as the availability is guaranteed from the perspective of the P

[GENERAL] postgresql with storage

2009-02-26 Thread Nagalingam, Karthikeyan
Hi, I have some basic query in postgresql with storage, Please help me for the following 1. What is the best practice to use postgresql with storage. 2. Which are the files and folders we can keep them in storage. Regards Karthikeyan.N

Re: [GENERAL] Format string for ISO-8601 date and time

2009-02-26 Thread Pavel Stehule
Hello 2009/2/26 Daniel Verite : > Hi, > > Is there a format string for to_char(timestamptz, text) that would output a > timestamp in full ISO-8601 format? That is, something like > 1977-04-22T01:00:00-05:00 > > I can't find a way to extract the offset against GMT from the docs here: > http://www.p

Re: [GENERAL] Can I use a query with UPDATE on its SET?

2009-02-26 Thread Eus
Hi Ho! --- On Thu, 2/26/09, Craig Ringer wrote: > Eus wrote: > > Hi Ho! > > > > Since I can do: > > > > INSERT INTO table (SELECT a_transaction.*); > > > > I am wondering whether I can do: > > > > UPDATE table SET (SELECT a_transaction.*) WHERE > primary_key = (SELECT a_transaction.primary_k

Re: [GENERAL] funny view/temp table problem with query

2009-02-26 Thread Grzegorz Jaśkiewicz
looks like you completely misunderstood my question. First of all, I wonder why the same query divided up in half - and using temporary table works as expected, and with everything together doesn't. And about rand(), it was tested on large enough set of runs, that I don't think it is to blame. The

[GENERAL] Format string for ISO-8601 date and time

2009-02-26 Thread Daniel Verite
Hi, Is there a format string for to_char(timestamptz, text) that would output a timestamp in full ISO-8601 format? That is, something like 1977-04-22T01:00:00-05:00 I can't find a way to extract the offset against GMT from the docs here: http://www.postgresql.org/docs/8.3/static/functions-f

Re: [GENERAL] funny view/temp table problem with query

2009-02-26 Thread Alban Hertroys
On Feb 25, 2009, at 11:02 AM, Grzegorz Jaśkiewicz wrote: So I have a 'accounts' table, with id and name, and than some hypothetical 'packages' table, containing some info per customer. I need to retrive distinct pairs , of random packages assigned per customer. Packages table contains 10 pac