not sure I understand the question, but from inside psql you can do:
\o FILENAMEsend all query results to file or |pipe
Robert Treat
On Thu, 2002-07-18 at 17:47, Joseph Syjuco wrote:
> how do i import results of my select query to a file
>
they are supposed to be.
Robert Treat
On Tue, 2002-07-23 at 10:53, Carmen Wai wrote:
> Hello:
>
> I am upgrading to postgresql version 7.2.1. I found that the psql has not
> included the readline library automatically and doesn't have any readline
> and history command func
re, but if you check out
http://www.postgresql.org/idocs/index.php?sql-set.html
and
http://www.postgresql.org/idocs/index.php?timezones.html
it will explain how to update your internal timezone as needed.
Robert Treat
On Wed, 2002-07-24 at 15:38, Ligia Pimentel wrote:
> I live in Guatemala, and our timezone i
I'm going to ask the crazy question of what language/interface are you
using to interact with postgres? Based on my interpretation of your
question I'd say that won't break (though one of your queries might
fail) but then again I may be totally misreading what you wrote...
Rober
recurrence). My question to those of
> > you that are
> > more experienced in postgresql is whether you would implement this
> > functionality in the
> > database level using triggers or at the application code level (PHP).
> >
> >
> > Any suggestions, etc
In psuedo-code : create rule on mytable on delete return null
Robert Treat
On Thu, 2002-09-26 at 15:00, Rajesh Kumar Mallah. wrote:
> Hi ,
>
> I have a created a database and a table in it,
>
> I want to prevent "DELETES" on the table in this
> database by everyo
s, but not moving. I'm hoping to find something
postgresql specific but if not that's ok. Thanks in advance,
Robert Treat
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
ives (probably the general list would be more fruitful) as
this comes up quite often.
Robert Treat
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
in advance,
>
If you haven't looked at dbbalancer yet, you might want to. Someone
mentioned it just a few days ago in a very similar thread on the general
list (iirc)
Robert Treat
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
There are actually two sections on the techdocs site now relating to
this at http://techdocs.postgresql.org/oresources.php
look under the sections ERD Tools and Database Design
Not that I'm not looking forward to your article Josh ;-)
Robert Treat
On Tue, 2002-11-05 at 11:33, Josh Berkus
. Instead I decided to use Case Studio 2.x, which is a
pretty good replacement imo. (For the record though, it is neither free
nor does it run on linux).
Robert Treat
On Tue, 2002-11-05 at 15:16, Kaare Rasmussen wrote:
> > Thanks. This gives me a few more tools to look at. Boy, do we h
add a rule to always set the old columns to NULL.
Robert Treat
On Fri, 2002-11-08 at 02:41, Huub wrote:
> Hi,
>
> I want to change 2 columns in the same table from numeric into int. Can
> I do this without deleting the old table and creating a new one? Data
> stays the sam
o do updateable rules and give only
permissions to the view for the caller. (Though maybe you have to use
triggers rather than rules to do this?) Does that sound right?
Robert Treat
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html
om parent;
select * from child;
insert into child (4,'four');
select * from parent;
create user mellymel;
grant select on child to mellymel;
grant insert on child to mellymel;
** reconnect as mellymel **
select * from parent; (generates error)
select * from child;
insert into child
There's no sense waiting as 7.3 is about to go RC1, and only the most
improbable circumstances would lead to a system catalog change at this
point. (If you do make a diagram, please post it to the group )
Robert Treat
On Wed, 2002-11-13 at 16:28, Jean-Luc Lachance wrote:
> Thanks, I kn
o=t_newparent
INTO
newparentrgt, newparentuid, newparenttid;
I think it's more readable and probably a little more efficient since
you are doing less variable assignment.
Robert Treat
On Tue, 2002-11-26 at 00:13, Martin Crundall wrote:
> I'm not sure that keying off lft is safe
Once your done scoping other things out, you might also want to look at
increasing the number of allowed connections (in postgresql.conf). The
defaults can be low for high traffic systems.
Robert Treat
On Wed, 2002-12-04 at 17:29, Steve Crawford wrote:
> You probably didn't need to re
Does anyone see
another work-around?
Robert Treat
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
If you just want to take a break, your better off sending
"set ALL nomail-14d" to majordomo.
Robert Treat
On Thu, 2002-12-19 at 07:39, Christoph Haller wrote:
>
> David and all others on the list,
> who want to turn off mailing over xmas and new year,
> please se
ons
that are allowed. This might be an indication of other problems, but if
you simply want to raise the limit you'll need to modify max_connections
in the postgresql.conf
Robert Treat
---(end of broadcast)---
TIP 2: you can get off all lists a
One could subscribe to pgsql-bugs if you wanted to look into any new
bugs that come down the pipe.
Robert Treat
On Wed, 2003-01-08 at 23:30, Bruce Momjian wrote:
>
> No bugzilla, but do have a TODO list. See the develope
ample put forth. The problem is that foo>$1
doesn't work, which by comparison would be SELECT* which would also not
work.
Robert Treat
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html
claim
that a certain feature needs to work in a different fashion, or needs to
be added at the expense of another feature, that it is only natural and
a good thing that the proposal be given a little scrutiny to make sure
it stands up. At this point yours does so in my book, though I still
woul
22922504 1960 con 500 17:43:36 /usr/bin
>
Are you sure those are connections. On server start you should get three
process going, the main postmaster, the stats collector, and the stats
buffer
Robert Treat
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
http://fts.postgresql.org/db/mw/msg.html?mid=1071582
On Tue, 2003-03-25 at 10:18, Christoph Haller wrote:
> >
> > Atul here, i have one table and i would like to increase the length
> of
> > existing column and the sql statement is
> >
> >Exisiting Column is "vehicle_make" varchar(30)
is, but oreilly has a number of
bio-informatics books, several of which deal specifically with perl.
Robert Treat
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Does anyone know if there is support for "IF x OR y THEN" syntax in
plpgsql? The docs just say IF [boolean expression] then. which loosely
interpreted could allow for an OR, but I couldn't seem to get it to
work. TIA,
Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middlew
On Thu, 2003-06-12 at 10:24, Stephan Szabo wrote:
>
> On 12 Jun 2003, Robert Treat wrote:
>
> > Does anyone know if there is support for "IF x OR y THEN" syntax in
> > plpgsql? The docs just say IF [boolean expression] then. which loosely
> > interpreted
+---+---+---
1 | 2 | 4 | A
4 | 5 | 6 | b
(2 rows)
but thats not valid sql, is there some way to accomplish this?
Robert Treat
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
On Mon, 2003-06-30 at 18:26, Robert Treat wrote:
> create table foo (a int, b int, c int, d text);
>
> create table bar (a int, b int, c int);
>
> insert into foo values (1,2,3,'a');
> insert into foo values (1,2,4,'A');
> insert into foo values (4,5,6
CT bar.a FROM bar
> WHERE bar.a = foo.a AND bar.b = foo.b
> AND bar.c = foo.c );
I was almost there with my original query... a NOT on your/stephan's
query gets me what I really want. :-) Thanks guys.
Robert Treat
--
Build A Brighter Lamp :: Linux Apache {
27;s "better", but this is one of the things people find
the RULE system really handy for. Check the docs, I believe there are
examples of this.
Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
; || f3) as x from t1;
or
select f,concat() as info from t2;
returns equivalent
select f,('f4:' || f4 || ' - f5:' || f5 || ' - f6:' || f6) as x from t2;
I'm starting to believe this is not possible, has anyone already done
it? :-)
Robert T
at I need the function to be generic so that I don't
have to pass the values down to the function, it just grabs the values
automagically based on the table it's being called against.
Robert Treat
> elein
>
> On Tue, Jul 22, 2003 at 06:31:52PM -0400, Robert Treat wrote:
On Wed, 2003-07-23 at 09:06, Robert Treat wrote:
> On Tue, 2003-07-22 at 19:33, elein wrote:
> > You'll need to pass the values down to your
> > concat function (which I suggest you don't call concat)
> > and have it return a text type.
> >
> > What
(1 row)
wait
--
t
(1 row)
now
---
2003-07-23 15:45:51.758621-04
(1 row)
21343=#
21343=# select now(); select wait(10); select now();
now
---
2003-07-23 15:45:58.713646-04
(1 row)
wait
--
t
(1 row)
talog lookups, but is pltcl inherently faster anyways?
thanks for the input so far.
Robert Treat
On Wed, 2003-07-23 at 15:38, [EMAIL PROTECTED] wrote:
> SELECT a,b,c,msgmaker('t1',ctid) FROM t1 WHERE a=b;
>
>
> CREATE OR REPLACE FUNCTION msgmaker(text,tid) RET
On Wed, 2003-07-23 at 15:38, [EMAIL PROTECTED] wrote:
> FOR myrec IN EXECUTE myinfo LOOP
> biglist := myrec.info;
> END LOOP;
>
One other thing, I hate when I have to do things like the above, can we
get a TODO like:
allow 'EXECUTE var INTO record' in plpgsql
Ro
On Wednesday 23 July 2003 19:06, Bruce Momjian wrote:
> Robert Treat wrote:
> > On Wed, 2003-07-23 at 15:38, [EMAIL PROTECTED] wrote:
> > > FOR myrec IN EXECUTE myinfo LOOP
> > > biglist := myrec.info;
> > > END LOOP;
> >
> > One other thing
I don't seem to have any plsql specfic documentation, and the rest of my
oracle documentation isn't specfific enough. Anyone else?
Robert Treat
On Thursday 31 July 2003 00:12, Bruce Momjian wrote:
> Does Oracle have a sy
If you went from a dual processor box running windows to a single
processor box running windows, I wouldn't be surprised to see a slow
down. I'd recommend switching from Windows to Linux/BSD over a hardware
upgrade any day.
Robert Treat
On Wed, 2003-08-06 at 18:04, Maksim Likharev wro
rather do an rpm -qa | grep post to see if postgresql-pl-7.3.4-2PGDG is
installed, it is the rpm for procedural languages in 7.3.* and didn't
exist in the 7.2.* rpmset.
Robert Treat
On Fri, 2003-09-12 at 10:12, Richard Huxton wrote:
> Please don't post html-only messages to the l
On Friday 12 September 2003 12:18, Richard Huxton wrote:
> On Friday 12 September 2003 16:49, Robert Treat wrote:
> > rather do an rpm -qa | grep post to see if postgresql-pl-7.3.4-2PGDG is
> > installed, it is the rpm for procedural languages in 7.3.* and didn't
> >
Generally speaking you can send articles to me or to [EMAIL PROTECTED]
for inclusion on the techdocs site.
I'll try to update the links you mentioned below as well. thanks.
Robert Treat
On Thursday 04 December 2003 12:52, Clint Stotesbery wrote:
> Hi Christoph,
> Thanks for the li
Just to follow up I managed to track down these missing articles and have
updated the links on the website.
Robert Treat
On Thursday 04 December 2003 12:52, Clint Stotesbery wrote:
> Hi Christoph,
> Thanks for the links but the techdoc links for converting from Oracle to
> Postgre
d method in 7.3
where its much more challenging.) HTH,
Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining
to
> from techdocs.
Done. :-)
>
> If you could identify candidate keys on a view, you could conceivably automate
> the process even more. That's got to be possible in some cases, but I'm not
> sure how difficult it is to do in all cases.
>
it seems somewhere be
On Wed, 2004-02-25 at 03:19, Jonathan M. Gardner wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> I'm not sure if my original reply made it through. Ignore the last one if
> it did.
But I liked the last one :-)
>
> On Tuesday 24 February 2004 1:48 pm,
take a look at http://techdocs.postgresql.org/guides/GUITools
Robert Treat
On Tue, 2004-03-09 at 02:53, BenLaKnet wrote:
>
> Rekall ...
> http://www.totalrekall.co.uk/ <http://www.totalrekall.co.uk/>
> (commercial website)
> http://www.reka
n external trigger, but am
wondering about a constraint oriented approach
Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
On Tue, 2004-04-06 at 11:17, Tom Lane wrote:
> Robert Treat <[EMAIL PROTECTED]> writes:
> > Trying to come up with the proper syntax to meet the following criteria:
> > create table foo (bar integer, baz boolean UNIQUE (bar, baz = true));
>
> The correct way to do i
ee thier website for
details.
--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
ach software is assigned a "class" based on the size of its
binary into a predetermined range of classes that are defined as
relative filesizes. The above query really does work... but istm I ought
to be joining those tables somehow... any ideas?
Robert Treat
--
Build A Brighter Lamp ::
mbers are both <=12, then you'll get one
> "date" and if the wrong one is >12 you'll get another. That can't be
> good.
>
Would it be possible to use a BEFORE trigger to reformat the -DD-MM
date to -MM-DD ? The error I see on 7.4 is ERROR:
guage 'plpgsql' IMMUTABLE STRICT;
> select test('001');
>
This function would work on 8.1, provided you created the sql statement
correctly:
query_value := 'SELECT col2 FROM ' ||lengendTableName||' WHERE col1 = \'' ||
col1_value || '\'';
)
Felix, in case your still watching, a (in theory) more up to date link would
be found at http://www.postgresql.org/docs/techdocs.3. Oh, and please don't
crosspost across 3 different lists in the future, it just creates noise for
the rest of us.
--
Robert Treat
Build A Brighter LAMP ::
ves (on update do nothing)
which tends to work pretty well. You can also add triggers into the mix to
raise errors on update. Also dont forget to revoke update/delete/install
privileges as appropriate. And look into vacuum freeze.
--
Robert Treat
Build A Brighter LAMP :: Linu
57 matches
Mail list logo