Re: [GENERAL] Linked server query problem

2008-12-04 Thread Richard Huxton
Anderson, Steven wrote: > I have SQL Server 2005 that is linked to Postgresql 8.3.1-1 Upgrade to the latest version in 8.3 at your soonest convenience. > The following query does not work > > SELECT id FROM ALERT.novastar.[public].[point] > > Error: > "SELECT "Tbl1002"."id" "Col1004" FROM "no

Re: [GENERAL] about privileges on pg_stat_activity columns

2008-12-04 Thread Richard Huxton
Jaime Casanova wrote: > Hi, > > there is an auditor that want to monitor our database activity to see > the session and the ip they come from, if they are waiting and so > on... pg_stat_activity and pg_locks views come to my mind... > > we created an user to him and give him privileges to pg_lock

Re: [GENERAL] Executing a user created function twice give an error

2008-12-04 Thread Wajid Khattak
Did try by encapsulating the create and drop queries within EXECUTE, but it seems to be giving the same error. The changed function is as follows: /// CREATE OR REPLACE FUNCTION func_snappointtonetwork(p_pointtobesnapped "varchar", p_currentboundingbox "varchar") RETURN

Re: [GENERAL] Executing a user created function twice give an error

2008-12-04 Thread A. Kretschmer
am Thu, dem 04.12.2008, um 9:23:31 + mailte Wajid Khattak folgendes: > Did try by encapsulating the create and drop queries within EXECUTE, but it > seems to be giving the same error. The changed function is as follows: You need to execute the insert-statement also: test=# create or replac

Re: [GENERAL] Executing a user created function twice give an error

2008-12-04 Thread Grzegorz Jaśkiewicz
On Thu, Dec 4, 2008 at 9:45 AM, A. Kretschmer <[EMAIL PROTECTED]> wrote: > test=*# select * from tmp_table(); > ERROR: relation with OID 187431854 does not exist that's a known problem, it was fixed in 8.3. I would strongly advice you to upgrade, shall you depend on temporary tables in plpgsql.

Re: [GENERAL] psql verbose mode

2008-12-04 Thread Grzegorz Jaśkiewicz
yup, looks like I'll have to implement it myself :P -- 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] psql verbose mode

2008-12-04 Thread Filip Rembiałkowski
2008/12/4 Grzegorz Jaśkiewicz <[EMAIL PROTECTED]> > yup, looks like I'll have to implement it myself :P > After a bit of investigation I think it's not so easy. -v switch is reserved in psql for "set variable". So the patch would have to inctroduce a new switch or use VERBOSITY environment varia

Re: [GENERAL] psql verbose mode

2008-12-04 Thread Grzegorz Jaśkiewicz
On Thu, Dec 4, 2008 at 11:36 AM, Filip Rembiałkowski <[EMAIL PROTECTED]> wrote: > There is another way - much simpler I think: > > psql -c '\l+' you're spoiling all the fun mate :P I think there ought to be some sort of --verbose mode, otherwise they wouldn't even bother implementing -l , with -c

[GENERAL] column name order matters in insert into foo from bar

2008-12-04 Thread Grzegorz Jaśkiewicz
hey, it looks , as if when I have two tables, say create table foo( a int, b varchar, c float ); and : create table bar( b varchar, a int, c float ); migration of data from one to the other using insert into foo select * from bar; will fail. How can I walk around that please ? --

Re: [GENERAL] column name order matters in insert into foo from bar

2008-12-04 Thread Grzegorz Jaśkiewicz
to answer myself, and also make matter a bit more complicated. the table has like 20 columns, so - yes, I can probably name all of them one by one, but - is there any way to do it without need to name all of them ? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] column name order matters in insert into foo from bar

2008-12-04 Thread Pavel Stehule
2008/12/4 Grzegorz Jaśkiewicz <[EMAIL PROTECTED]>: > to answer myself, and also make matter a bit more complicated. > the table has like 20 columns, so - yes, I can probably name all of > them one by one, but - is there any way to do it without need to name > all of them ? > no, regards Pavel Ste

[GENERAL] serial

2008-12-04 Thread Gustavo Rosso
I created this table: create table se (n serial); Column | Type | Modifiers -+-+ n | integer| not null default nextval('se_n_seq'::regclass) I inserted two record, later select, but column n (

Re: [GENERAL] column name order matters in insert into foo from bar

2008-12-04 Thread Grzegorz Jaśkiewicz
On Thu, Dec 4, 2008 at 1:27 PM, Pavel Stehule <[EMAIL PROTECTED]> wrote: > p.s. you can try use stored procedure for generating these statements yeah, I ended up generating it using: select array_to_string(ARRAY(select column_name::text FROM information_schema.columns where table_name='foo'), '

Re: [GENERAL] serial

2008-12-04 Thread Grzegorz Jaśkiewicz
On Thu, Dec 4, 2008 at 2:42 PM, Gustavo Rosso <[EMAIL PROTECTED]> wrote: > I created this table: > > create table se (n serial); > in case you did just insert into se(n) values(0); twice, it won't work if you want to add series of numbers, don't define it as serial. Serial is for a different purpo

Re: [GENERAL] serial

2008-12-04 Thread Serge Fonville
On Thu, Dec 4, 2008 at 3:42 PM, Gustavo Rosso <[EMAIL PROTECTED]> wrote: > I created this table: > > create table se (n serial); > > Column | Type | Modifiers > -+-+ > n | integer| not null defau

[GENERAL] pg_stat_activity

2008-12-04 Thread paulo matadr
my querys is very biggest ,pg_stat_activity dont show full How increase length from pg_stat_activity ? Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com

Re: [GENERAL] about privileges on pg_stat_activity columns

2008-12-04 Thread Jaime Casanova
On Thu, Dec 4, 2008 at 4:02 AM, Richard Huxton <[EMAIL PROTECTED]> wrote: > Jaime Casanova wrote: >> >> we created an user to him and give him privileges to pg_locks and >> pg_stat_activity (and the functions pg_stat_activity is calling) but >> still he see the columns that comes from the functions

Re: [GENERAL] serial

2008-12-04 Thread Pavel Stehule
2008/12/4 Gustavo Rosso <[EMAIL PROTECTED]>: > I created this table: > > create table se (n serial); > > Column | Type | Modifiers > -+-+ > n | integer| not null default nextval('se_n_seq'::regcla

Re: [GENERAL] serial

2008-12-04 Thread Scott Marlowe
On Thu, Dec 4, 2008 at 7:42 AM, Gustavo Rosso <[EMAIL PROTECTED]> wrote: > I created this table: > > create table se (n serial); > > Column | Type | Modifiers > -+-+ > n | integer| not null defaul

Re: [GENERAL] serial

2008-12-04 Thread Scott Marlowe
On Thu, Dec 4, 2008 at 7:06 AM, Scott Marlowe <[EMAIL PROTECTED]> wrote: > On Thu, Dec 4, 2008 at 7:42 AM, Gustavo Rosso <[EMAIL PROTECTED]> wrote: >> I created this table: >> >> create table se (n serial); >> >> Column | Type | Modifiers >> -+-+

Re: [GENERAL] pg_stat_activity

2008-12-04 Thread Scott Marlowe
2008/12/4 paulo matadr <[EMAIL PROTECTED]>: > my querys is very biggest ,pg_stat_activity dont show full > How increase length from pg_stat_activity ? I don't think you can (easily). You can, however, log long running queries and that should log the whole thing. -- Sent via pgsql-general maili

Re: [GENERAL] serial

2008-12-04 Thread Gregory Williamson
The esteemed Scott Marlowe said: > > On Thu, Dec 4, 2008 at 7:42 AM, Gustavo Rosso <[EMAIL PROTECTED]> wrote: > > I created this table: > > <...> > > Because MySQL taught you bad habits? You told the db to insert a 0, > so it inserted a 0. With respect, sir, let me point out that Informix us

Re: [GENERAL] Linked server query problem

2008-12-04 Thread Hiroshi Saito
Hi. Probably, it need the new feature of Ver 8.4. See, http://archives.postgresql.org/pgsql-committers/2008-02/msg00172.php Regards, Hiroshi Saito - Original Message - I have SQL Server 2005 that is linked to Postgresql 8.3.1-1 The following query does not work SELECT id FROM ALE

Re: [GENERAL] serial

2008-12-04 Thread Scott Marlowe
On Thu, Dec 4, 2008 at 7:47 AM, Gregory Williamson <[EMAIL PROTECTED]> wrote: > The esteemed Scott Marlowe said: > >> >> On Thu, Dec 4, 2008 at 7:42 AM, Gustavo Rosso <[EMAIL PROTECTED]> >> wrote: >> > I created this table: >> > > <...> >> >> Because MySQL taught you bad habits? You told the db to

[GENERAL] spanish

2008-12-04 Thread Gustavo Rosso
Please, exists postgres forum in spanish? Thanks Gustavo -- 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] Favorite Tom Lane quotes

2008-12-04 Thread Robert Treat
On Monday 01 December 2008 22:09:08 Scott Marlowe wrote: > On Mon, Dec 1, 2008 at 7:49 PM, Grzegorz Jaśkiewicz <[EMAIL PROTECTED]> wrote: > > which reminds me, of my favourite recent quote: > > "Think I'll go fix this while I'm watching the football game ..." > > We really need a favorite Tom Lane

Re: [GENERAL] spanish

2008-12-04 Thread Grzegorz Jaśkiewicz
On Thu, Dec 4, 2008 at 4:44 PM, Gustavo Rosso <[EMAIL PROTECTED]> wrote: > Please, exists postgres forum in spanish? http://archives.postgresql.org/pgsql-es-ayuda/ -- GJ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.po

Re: [GENERAL] Favorite Tom Lane quotes

2008-12-04 Thread Grzegorz Jaśkiewicz
2008/12/4 Robert Treat <[EMAIL PROTECTED]>: > http://archives.postgresql.org/pgsql-hackers/2006-04/msg00288.php > I remember after reading this post wondering whether Tom uses caffeinated > soap... > well, some ppl come up with ideas on wc-thone ;) What do you suggest they do there ... ;> -- G

Re: [GENERAL] Job scheduling in Postgre

2008-12-04 Thread Robert Treat
On Tuesday 02 December 2008 07:11:02 A. Kretschmer wrote: > am Tue, dem 02.12.2008, um 16:45:16 +0500 mailte IPS folgendes: > > I have certain jobs to be executed automatically at a given interval of > > time in the postgre SQL database. Is their any utility/feature available > > in Postgre to do

Re: [GENERAL] Switch off PITR

2008-12-04 Thread Robert Treat
On Wednesday 03 December 2008 14:22:28 Joshua D. Drake wrote: > On Wed, 2008-12-03 at 13:16 -0500, Bill Moran wrote: > > In response to "Joey K." <[EMAIL PROTECTED]>: > > > How do I turn off PITR in the mean time? I commented archive_command > > > and issued a pg_ctl reload and postgres is *still*

Re: [GENERAL] Limit on number of databases in a Cluster ?

2008-12-04 Thread Robert Treat
On Wednesday 03 December 2008 23:49:00 Scott Marlowe wrote: > On Wed, Dec 3, 2008 at 11:05 AM, Josh Harrison <[EMAIL PROTECTED]> wrote: > > On Wed, Dec 3, 2008 at 11:51 AM, Scott Marlowe <[EMAIL PROTECTED]> > > > > wrote: > >> On Wed, Dec 3, 2008 at 8:43 AM, Josh Harrison <[EMAIL PROTECTED]> wrote:

Re: [GENERAL] Job scheduling in Postgre

2008-12-04 Thread Dave Page
On Thu, Dec 4, 2008 at 3:50 PM, Robert Treat <[EMAIL PROTECTED]> wrote: > On Tuesday 02 December 2008 07:11:02 A. Kretschmer wrote: >> am Tue, dem 02.12.2008, um 16:45:16 +0500 mailte IPS folgendes: >> > I have certain jobs to be executed automatically at a given interval of >> > time in the post

Re: [GENERAL] Favorite Tom Lane quotes

2008-12-04 Thread Scott Marlowe
On Thu, Dec 4, 2008 at 8:49 AM, Grzegorz Jaśkiewicz <[EMAIL PROTECTED]> wrote: > 2008/12/4 Robert Treat <[EMAIL PROTECTED]>: >> http://archives.postgresql.org/pgsql-hackers/2006-04/msg00288.php >> I remember after reading this post wondering whether Tom uses caffeinated >> soap... >> > > well, some

Re: [GENERAL] spanish

2008-12-04 Thread Joshua D. Drake
On Thu, 2008-12-04 at 13:44 -0300, Gustavo Rosso wrote: > Please, exists postgres forum in spanish? http://archives.postgresql.org/pgsql-es-ayuda/ > Thanks > Gustavo > -- PostgreSQL Consulting, Development, Support, Training 503-667-4564 - http://www.commandprompt.com/ The PostgreSQL C

Re: [GENERAL] spanish

2008-12-04 Thread leonel
Gustavo Rosso wrote: > Please, exists postgres forum in spanish? > Thanks > Gustavo > aqui se habla español : http://archives.postgresql.org/pgsql-es-ayuda/ Saludos .. Leonel -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://ww

Re: [GENERAL] Job scheduling in Postgre

2008-12-04 Thread A. Kretschmer
am Thu, dem 04.12.2008, um 10:50:38 -0500 mailte Robert Treat folgendes: > On Tuesday 02 December 2008 07:11:02 A. Kretschmer wrote: > > am Tue, dem 02.12.2008, um 16:45:16 +0500 mailte IPS folgendes: > > > I have certain jobs to be executed automatically at a given interval of > > > time in the

[GENERAL] Eweek-Sun-Monty-MySQL

2008-12-04 Thread justin
Eweek Article above is article on eweek discussing Monty's blog on the poor shape MySql 5.1 is in

Re: [GENERAL] Job scheduling in Postgre

2008-12-04 Thread Dave Page
On Thu, Dec 4, 2008 at 4:21 PM, A. Kretschmer <[EMAIL PROTECTED]> wrote: > am Thu, dem 04.12.2008, um 10:50:38 -0500 mailte Robert Treat folgendes: >> On Tuesday 02 December 2008 07:11:02 A. Kretschmer wrote: >> > am Tue, dem 02.12.2008, um 16:45:16 +0500 mailte IPS folgendes: >> > > I have certa

[GENERAL] Q: inheritance

2008-12-04 Thread Rüdiger Sörensen
hi, I think I misunderstand the concept of inheritance. I was under the impression that inheriting from an existing table inherits all of the parent's columns. But: create table t1 (id serial primary key); create table t2 (num int) inherits (t1); create table t3 (t1 int references t1(id)); inse

Re: [GENERAL] Q: inheritance

2008-12-04 Thread Richard Huxton
Rüdiger Sörensen wrote: > can anyone explain this behaviour? My database setup relies on inherited > tables that share a primary key. I'm afraid inherited tables don't share a primary key. See the manuals for full details. -- Richard Huxton Archonet Ltd -- Sent via pgsql-general mailing li

Re: [GENERAL] Job scheduling in Postgre

2008-12-04 Thread A. Kretschmer
am Thu, dem 04.12.2008, um 16:40:38 + mailte Dave Page folgendes: > >> There is a database level schedular called (iirc) pgAgent, which comes > >> bundled > >> with pgAdmin. I think it's so well hidden because it comes as a part of a > > > > How does it work? Independent from the OS? On the s

Re: [GENERAL] Q: inheritance

2008-12-04 Thread Richard Broersma
On Thu, Dec 4, 2008 at 8:40 AM, Rüdiger Sörensen <[EMAIL PROTECTED]> wrote: > insert or update in table "t3" violates foreign key constraint "t3_t1_fkey" > DETAIL: key(t1)=(1) is not present in table "t1" > select * from t2; > id | num > +- > 1 | 1 > can anyone explain this behaviour

Re: [GENERAL] How to echo statements in sourced file?

2008-12-04 Thread Kynn Jones
Thank you all. From your replies I was able to figure out what I needed: "\set ECHO queries" Kynn On Wed, Dec 3, 2008 at 7:14 PM, Kynn Jones <[EMAIL PROTECTED]> wrote: > Hi. I have a collection of SQL statements stored in a file that I run > periodically via cron. Running this "script" takes

[GENERAL] cumulative count

2008-12-04 Thread Carson Farmer
Hi list, This is my first post to pgsql, so hopefully I'm not asking something that has been answered a thousand time before. I've looked online, and through the archives, but I haven't found anything that answers my question specifically: Say I have a table like this: date |

Re: [GENERAL] cumulative count

2008-12-04 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Carson Farmer <[EMAIL PROTECTED]> writes: > date | user > --+- > 20050201 | Bill > 20050210 | Steve > 20050224 | Sally > 20050311 | Martha > 20050316 | Ryan > 20050322 |

Re: [GENERAL] cumulative count

2008-12-04 Thread Gerhard Heift
On Thu, Dec 04, 2008 at 07:32:59PM +0100, Harald Fuchs wrote: > In article <[EMAIL PROTECTED]>, > Carson Farmer <[EMAIL PROTECTED]> writes: > > > date | user > > --+- > > 20050201 | Bill > > 20050210 | Steve > > 20050224 |

[GENERAL] Automatic insert statement generator?

2008-12-04 Thread Rob Richardson
Greetings! I was going to make this a question, but I poked around a bit and came up with an answer, which I'll share here in case anyone else is interested. I occasionally need to add test records to a database table. For example, I want a new charge that is identical to charge 18000, so I need

Re: [GENERAL] serial

2008-12-04 Thread Raymond O'Donnell
On 04/12/2008 14:47, Gregory Williamson wrote: > With respect, sir, let me point out that Informix usage says to insert a > zero to trigger a serial column, so don't be indicting Gustavo on MySQL So what do you do if you just want to insert a zero? - just curious... In fairness, I suppose you wo

Re: [GENERAL] cumulative count

2008-12-04 Thread Pavel Stehule
2008/12/4 Carson Farmer <[EMAIL PROTECTED]>: > Hi list, > > This is my first post to pgsql, so hopefully I'm not asking something that > has been answered a thousand time before. I've looked online, and through > the archives, but I haven't found anything that answers my question > specifically: >

Re: [GENERAL] cumulative count

2008-12-04 Thread David Fetter
On Thu, Dec 04, 2008 at 05:53:06PM +, Carson Farmer wrote: > Hi list, > > This is my first post to pgsql, so hopefully I'm not asking something > that has been answered a thousand time before. I've looked online, and > through the archives, but I haven't found anything that answers my > q

Re: [GENERAL] Job scheduling in Postgre

2008-12-04 Thread Jason Long
Robert Treat wrote: On Tuesday 02 December 2008 07:11:02 A. Kretschmer wrote: am Tue, dem 02.12.2008, um 16:45:16 +0500 mailte IPS folgendes: I have certain jobs to be executed automatically at a given interval of time in the postgre SQL database. Is their any utility/feature availabl

Re: [GENERAL] Job scheduling in Postgre

2008-12-04 Thread Scott Marlowe
On Thu, Dec 4, 2008 at 3:54 PM, Jason Long <[EMAIL PROTECTED]> wrote: > > What is everyone using instead of pgAdmin? > In production I only use ssh and psql, but in development I do use pgAdmin. I do it all with cron and psql / pg_backup / bash -- Sent via pgsql-general mailing list (pgsql-gen

[GENERAL] COPY error with null date

2008-12-04 Thread Bill Todd
Using 8.3.3 I am trying to import a CSV file using the following copy command. copy billing.contact from 'c:/export/contact.csv' with delimiter as ',' null as '' csv quote as '"'; The following record record causes an error because the third field, "", is a null date and causes the error follo

Re: [GENERAL] COPY error with null date

2008-12-04 Thread Joshua D. Drake
On Thu, 2008-12-04 at 19:35 -0700, Bill Todd wrote: > Using 8.3.3 I am trying to import a CSV file using the following copy > command. > > copy billing.contact from 'c:/export/contact.csv' > with delimiter as ',' > null as '' > csv quote as '"'; > > The following record record causes an error be