Re: [GENERAL] 'default nextval()' loses schema-qualification in dump ?

2010-07-07 Thread Arnaud Lesauvage
Le 6/07/2010 17:17, Tom Lane a écrit : Arnaud Lesauvage writes: As you have understood, I am not very savvy about postgresql's internals, but from what you say my guess is that the problem is int the psqlODBC is getting the default value of the sequence ? I have no idea, because you haven'

Re: [GENERAL] 'default nextval()' loses schema-qualification in dump ?

2010-07-07 Thread Richard Huxton
On 07/07/10 07:47, Arnaud Lesauvage wrote: Le 6/07/2010 17:17, Tom Lane a écrit : Arnaud Lesauvage writes: As you have understood, I am not very savvy about postgresql's internals, but from what you say my guess is that the problem is int the psqlODBC is getting the default value of the sequenc

[GENERAL] Problems with Vista and Windows 7

2010-07-07 Thread el dorado
Hello! I use Postgres 8.4.1 as service, with Windows 7. It seems to me the same situation will take place with Vista. I've notice that in some special cases PG uses folder %APPDATA% for Windows user 'postgres', instead of the PostgreSQL-specific application data folder (f.e., C:\PostgreSQL\8.4\

[GENERAL] How to Get Column Names from the Table

2010-07-07 Thread venkat
Dear All, How to get Column Names from Table in PostgreSQL. Thanks and Regards, Venkat

Re: [GENERAL] How to Get Column Names from the Table

2010-07-07 Thread AI Rumman
Use: \d tablename On Wed, Jul 7, 2010 at 3:08 PM, venkat wrote: > Dear All, > >How to get Column Names from Table in PostgreSQL. > > Thanks and Regards, > > Venkat >

Re: [GENERAL] [SQL] How to Get Column Names from the Table

2010-07-07 Thread Viktor Bojović
\d tableName On Wed, Jul 7, 2010 at 11:08 AM, venkat wrote: > Dear All, > >How to get Column Names from Table in PostgreSQL. > > Thanks and Regards, > > Venkat > -- --- Viktor Bojović --- Wherever I go, Murphy goes w

Re: [GENERAL] How to Get Column Names from the Table

2010-07-07 Thread Jayadevan M
> Use: > \d tablename And what I really like about it is the way you can make a guess about the table name and use * . postgres-# \d mt* Table "public.mt1" Column | Type | Modifiers +-+--- id | integer | Table "public.mt2" Column | Type | Modi

[GENERAL] Odd behaviour in update rule

2010-07-07 Thread Denis Gasparin
Hi. I have an odd behaviour on an update rule in postgresql 8.2 and i'd like to know if the behaviour is as expected or not. The following sql statements prepare the table, view and rule. create table main ( id integer not null primary key, value integer not null ); create view view_mai

Re: [GENERAL] [SQL] How to Get Column Names from the Table

2010-07-07 Thread Sreelatha G
Hi, To get column names only select column_name from information_schema.columns where table_name='captor_prime_aggregates'; Thanks Sreelatha On Wed, Jul 7, 2010 at 2:44 PM, Viktor Bojović wrote: > \d tableName > > > On Wed, Jul 7, 2010 at 11:08 AM, venkat wrote: > >> Dear All, >> >>How to

Re: [GENERAL] [SQL] How to Get Column Names from the Table

2010-07-07 Thread venkat
Dear Sreelatha. It is working fine. Thanks alot. Thanks and Regards, Venkat On Wed, Jul 7, 2010 at 3:42 PM, Sreelatha G wrote: > Hi, > > To get column names only > > select column_name from information_schema.columns where > table_name='captor_prime_aggregates'; > > Thanks > Sreelatha > On

Re: [GENERAL] TupleDesc and HeapTuple

2010-07-07 Thread Luca Ferrari
On Tuesday, July 06, 2010 09:58:45 pm Alvaro Herrera's cat walking on the keyboard wrote: > You're supposed to know which relation you got the HeapTuple from, so > you get the TupleDesc from there. True, but if I want to pass the heaptuple around I must pass also its tuple desc, or the receiver

[GENERAL] optimizer choosing the wrong index

2010-07-07 Thread Martin Below
Hello, I'm facing a strange problem where the optimizer does pick the wrong index. Im using postgres 8.4, and my schema look like this:  client_id   | character varying(36)       | not null  key         | character varying(16)       | not null  expires_on  | timestamp without time zone | not null

Re: [GENERAL] TupleDesc and HeapTuple

2010-07-07 Thread Pavel Stehule
2010/7/7 Luca Ferrari : > On Tuesday, July 06, 2010 09:58:45 pm Alvaro Herrera's cat walking on the > keyboard wrote: >> You're supposed to know which relation you got the HeapTuple from, so >> you get the TupleDesc from there. > > True, but if I want to pass the heaptuple around I must pass also i

Re: [GENERAL] optimizer choosing the wrong index

2010-07-07 Thread Merlin Moncure
On Wed, Jul 7, 2010 at 7:42 AM, Martin Below wrote: > Hello, > > I'm facing a strange problem where the optimizer does pick the wrong index. > Im using postgres 8.4, and my schema look like this: > >  client_id   | character varying(36)       | not null >  key         | character varying(16)      

Re: [GENERAL] make view with union return one record

2010-07-07 Thread Merlin Moncure
On Tue, Jul 6, 2010 at 3:43 PM, Andy Colson wrote: > I have gis data in layers, and a pin might appear in either layer, or both > (parcelPoly, parcelPoint), or neither (and I dont care which I find)... so I > have this view: > > > create view howardia.getPoint(shapeid, x, y, acres, pin, extent) as

[GENERAL] Want to schedule tasks for the future

2010-07-07 Thread Matthew Wilson
Just recently I discovered the listen/notify feature in postgresql. Now I don't have external processes polling tables, watching for new inserted rows. Anyhow, I'm curious if there is some other feature that will help me out with a new puzzle. I want to store emails to deliver at a later time in

Re: [GENERAL] make view with union return one record

2010-07-07 Thread Andy Colson
On 7/7/2010 8:27 AM, Merlin Moncure wrote: On Tue, Jul 6, 2010 at 3:43 PM, Andy Colson wrote: I have gis data in layers, and a pin might appear in either layer, or both (parcelPoly, parcelPoint), or neither (and I dont care which I find)... so I have this view: create view howardia.getPoint(s

[GENERAL] I wonder what Postgres would be listed for?

2010-07-07 Thread Merlin Moncure
This page speaks for itself :D https://shop.oracle.com/pls/ostore/product?p1=berkeleydb&sc=ocom_berkeleydb merlin -- 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] Want to schedule tasks for the future

2010-07-07 Thread Sam Mason
On Wed, Jul 07, 2010 at 01:53:25PM +, Matthew Wilson wrote: > create table scheduled_email ( > to_address text, > email_subject text, > email_body text, > deliver_at timestamp, > sent boolean > ); > > I know I could write an external process to p

Re: [GENERAL] optimizer choosing the wrong index

2010-07-07 Thread Tom Lane
Martin Below writes: > Why is "idx_wrong" used (which only includes one of the fields > queried) instead of idx_correct (which contains both fields)? It's not immediately clear that that choice is "wrong". A two-column index is bigger and hence more expensive to search than a one-column index --

Re: [GENERAL] Want to schedule tasks for the future

2010-07-07 Thread Vick Khera
On Wed, Jul 7, 2010 at 9:53 AM, Matthew Wilson wrote: > But is there some other way inside postgresql that will do something > similar?  I would want something like listen/notify, where postgres > starts an external process when any data exist. > No, there is no facility to do this within the dat

Re: [GENERAL] make view with union return one record

2010-07-07 Thread Andy Colson
On 7/7/2010 8:27 AM, Merlin Moncure wrote: On Tue, Jul 6, 2010 at 3:43 PM, Andy Colson wrote: I have gis data in layers, and a pin might appear in either layer, or both (parcelPoly, parcelPoint), or neither (and I dont care which I find)... so I have this view: create view howardia.getPoint(s

[GENERAL] Trigger for modification timestamp column

2010-07-07 Thread Johan Andersson
Hello! I am trying to write a trigger for updating a modification column and am having some trouble getting it to behave as I want. The trigger should set the column to the supplied value if it is set in the UPDATE statement and to the current timestamp [NOW()] if it is not. The problem is that

Re: [GENERAL] Trigger for modification timestamp column

2010-07-07 Thread Pavel Stehule
2010/7/7 Johan Andersson : > > Hello! > > I am trying to write a trigger for updating a modification column and am > having some trouble getting it to behave as I want. > > The trigger should set the column to the supplied value if it is set in the > UPDATE statement and to the current timestamp [N

Re: [GENERAL] Trigger for modification timestamp column

2010-07-07 Thread Susan Cassidy
Can't you check it using something like this: IF OLD.modified = NEW.modified THEN NEW.modified = NOW(); END IF; RETURN NEW; Susan -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Johan Andersson Sent: Wednesday, July 0

Re: [GENERAL] Trigger for modification timestamp column

2010-07-07 Thread Pavel Stehule
2010/7/7 Susan Cassidy : > Can't you check it using something like this: > > IF OLD.modified = NEW.modified THEN >  NEW.modified = NOW(); > END IF; > RETURN NEW; but this take only case where column modified was changed. There are not a functionality for detection if user explicitly updated column

Re: [GENERAL] Problems with Vista and Windows 7

2010-07-07 Thread Igor Neyman
> -Original Message- > From: el dorado [mailto:do_ra...@mail.ru] > Sent: Wednesday, July 07, 2010 4:19 AM > To: pgsql-general@postgresql.org > Subject: Problems with Vista and Windows 7 > > Hello! > I use Postgres 8.4.1 as service, with Windows 7. It seems to > me the same situation w

Re: [GENERAL] Trigger for modification timestamp column

2010-07-07 Thread Michael Nolan
On Wed, Jul 7, 2010 at 8:48 AM, Johan Andersson wrote: > > Hello! > > I am trying to write a trigger for updating a modification column and am > having some trouble getting it to behave as I want. > > The trigger should set the column to the supplied value if it is set in the > UPDATE statement a

Re: [GENERAL] Want to schedule tasks for the future

2010-07-07 Thread bs
Matthew Wilson schrieb: > Just recently I discovered the listen/notify feature in postgresql. > Now I don't have external processes polling tables, watching for new > inserted rows. > You could try http://www.pogo.org.uk/~mark/pgnotifyd/ Just found it, not tested until now. Bernhard -- Sent

Re: [GENERAL] Want to schedule tasks for the future

2010-07-07 Thread Chris Browne
m...@tplus1.com (Matthew Wilson) writes: > Just recently I discovered the listen/notify feature in postgresql. > Now I don't have external processes polling tables, watching for new > inserted rows. > > Anyhow, I'm curious if there is some other feature that will help me out > with a new puzzle. >

[GENERAL] to_date function

2010-07-07 Thread Carlos Henrique Reimer
Hi I've a Linux box running postgresql 8.2.17 and facing some strange results from the to_date function. As you can see in the following tests the problem occurs when the template used includes upper and lower case characters for the minute (Mi or mI). Am I using the incorrect syntax or is it a

[GENERAL] Anyone in Madison?

2010-07-07 Thread Josh Berkus
Folks, I'll be unexpectedly in Madison next week for an onsite contract. Is there a user group in Madison I could meet up with? Maybe do a quick session on 9.0? -- -- Josh Berkus PostgreSQL Experts Inc.

Re: [GENERAL] to_date function

2010-07-07 Thread Tim Landscheidt
Carlos Henrique Reimer wrote: > I've a Linux box running postgresql 8.2.17 and facing some strange results > from the to_date function. > As you can see in the following tests the problem occurs when the template > used includes upper and lower case characters for the minute (Mi or mI). > Am I

Re: [GENERAL] to_date function

2010-07-07 Thread Tom Lane
Carlos Henrique Reimer writes: > I've a Linux box running postgresql 8.2.17 and facing some strange results > from the to_date function. > As you can see in the following tests the problem occurs when the template > used includes upper and lower case characters for the minute (Mi or mI). > Am I

Re: [GENERAL] to_date function

2010-07-07 Thread Ludwig Kniprath
Hi, on a Windows/PostgrSQL 8.4 three from your queries throw errors (sorry, but they are in german): select to_date('01/04/2013 23:59:59','DD/MM/ HH24:Mi:SS'); => FEHLER: ungültige Kombination von Datumskonventionen HINT: Die Gregorianische und die ISO-Konvention für Wochendaten können n

Re: [GENERAL] Anyone in Madison?

2010-07-07 Thread Kevin Grittner
Josh Berkus wrote: > I'll be unexpectedly in Madison next week for an onsite contract. > Is there a user group in Madison I could meet up with? Maybe do a > quick session on 9.0? There's not a PostgreSQL user group in the area, but the Madison PC Users' Group meets the 2nd Wednesday of each

Re: [GENERAL] [pgsql-advocacy] Anyone in Madison?

2010-07-07 Thread David Fetter
On Wed, Jul 07, 2010 at 02:31:04PM -0700, Josh Berkus wrote: > Folks, > > I'll be unexpectedly in Madison next week for an onsite contract. Is > there a user group in Madison I could meet up with? Maybe do a quick > session on 9.0? As there are almost as many Madisons as Springfields, it may he

Re: [GENERAL] Problems with Vista and Windows 7

2010-07-07 Thread Craig Ringer
On 07/07/10 16:19, el dorado wrote: > Hello! > I use Postgres 8.4.1 as service, with Windows 7. It seems to me the same > situation will take place with Vista. > > I've notice that in some special cases PG uses folder %APPDATA% for Windows > user 'postgres', instead of the PostgreSQL-specific ap

Re: [GENERAL] [pgsql-advocacy] Anyone in Madison?

2010-07-07 Thread Andrew Maclean
He is not going to Australia there are none here! Regards Andrew On Thu, Jul 8, 2010 at 10:54 AM, David Fetter wrote: > On Wed, Jul 07, 2010 at 02:31:04PM -0700, Josh Berkus wrote: >> Folks, >> >> I'll be unexpectedly in Madison next week for an onsite contract.  Is >> there a user group in Ma

Re: [GENERAL] [pgsql-advocacy] Anyone in Madison?

2010-07-07 Thread Joshua D. Drake
On Wed, 2010-07-07 at 17:54 -0700, David Fetter wrote: > On Wed, Jul 07, 2010 at 02:31:04PM -0700, Josh Berkus wrote: > > Folks, > > > > I'll be unexpectedly in Madison next week for an onsite contract. Is > > there a user group in Madison I could meet up with? Maybe do a quick > > session on 9.

Re: [GENERAL] Problems with Vista and Windows 7

2010-07-07 Thread Andrew Maclean
It is a vexed issue with Vista/Windows 7. I found this somewhere on a blog on the web (it may help): -- When I'm working to resolve compatibility issues, there are always multiple options to mitigate. The solution we prefer to use is to update the code. A common applicati

Re: [GENERAL] Problems with Vista and Windows 7

2010-07-07 Thread Craig Ringer
On 08/07/10 09:22, Andrew Maclean wrote: > It is a vexed issue with Vista/Windows 7. > > I found this somewhere on a blog on the web (it may help): The default datadir location has been discussed to death. There are fairly decent reasons it's still in Program Files on Vista/Win7 - not the least o

[GENERAL] \COPY ... CSV with hex escapes

2010-07-07 Thread Craig Ringer
Hi folks I have an odd csv input format to deal with. I'm about to put some Python together to reprocess it, but I thought I'd check in and see if I'm missing something obvious in \copy's capabilities. The input is fairly conventional comma-delimeted text with quoted fields, as output by Sybase S

Re: [GENERAL] \COPY ... CSV with hex escapes

2010-07-07 Thread Peter Hunsberger
On Wed, Jul 7, 2010 at 9:21 PM, Craig Ringer wrote: > Hi folks > > I have an odd csv input format to deal with. I'm about to put some > Python together to reprocess it, but I thought I'd check in and see if > I'm missing something obvious in \copy's capabilities. > > The input is fairly convention

[GENERAL] Harshad Pethe wants to stay in touch on LinkedIn

2010-07-07 Thread Harshad Pethe
LinkedIn Harshad Pethe requested to add you as a connection on LinkedIn: -- Andrew, I'd like to add you to my professional network on LinkedIn. - Harshad Pethe Accept invitation from Harshad Pethe http://www.linkedin.com/e/v74zw8-gbd3gwoo-k/AT

Re: [GENERAL] pl-perl for 64 bits in Solaris 9

2010-07-07 Thread Felipe de Jesús Molina Bravo
El 26 de junio de 2010 16:56, Felipe de Jesús Molina Bravo < fjmolinabr...@gmail.com> escribió: > > > 2010/6/25 John R Pierce > >> On 06/25/10 9:28 PM, Felipe de Jesús Molina Bravo wrote: >> >> original perl is 5.6. so i installed perl 5.8.9 for 64 bit and the >>> error is the same... maybe m