Re: [GENERAL] scripts in Postgres

2005-05-02 Thread Rolf Østvik
[EMAIL PROTECTED] ("Craig Bryden") wrote in
news:[EMAIL PROTECTED]: 

> Hi Sean
> 
> Thanks for that. Does psql work differently to pgAmin III's Query
> program? I have tried exactly what you showed me below, and it did not
> work. It seems like the script stops on first error, and the first
> error is that the table does not exist.
> 

Could it be that it pgAdmin creates a transaction.
What happens if you set in some begin and commit.
(Just a wild suggestion, not tested in any way).

begin;
DROP TABLE tb_messages;
commit;
begin;
CREATE TABLE tb_messages (

);
commit;

-- 
Rolf

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [GENERAL] Formatting Function..

2004-07-08 Thread Rolf Østvik
[EMAIL PROTECTED] (Vinay Jain) wrote in 
news:[EMAIL PROTECTED]:

> Hi..
> I am newbe in postgresql so please help me though the question may be
> very easy to answer..
> Is there any formatting function to get output with fix lengths..for
> example my query is..
> schema is:
> 
> Student
> (name Varchar,
> age integer);
> 
> select name, age from student;
> the output is like this..
> Name  | Age
> xyz  | 22

I am a little curious about where you want your data to be presented. If it 
is only output in psql or other places where text is presented with a fixed 
with font then my suggestions will help.
(If the data is to be outputted in html format then there are other 
methods.)

One option is to store text data in char coloumns, it will fill the field 
with spaces to the left. This i will only recommend in special cases.


Use formatting functions instead
for text use lpad and rpad
for numbers use to_char
example:
select rpad(name,20) as 'Name', to_char(age,'') as 'Age' from student;

read more about it in the manual (Chapter 9 in the 7.4. documentation)
-- 
Rolf

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [GENERAL] Important Info on comp.databases.postgresql.general

2004-11-10 Thread Rolf Østvik
[EMAIL PROTECTED] ("Net Virtual Mailing Lists") wrote in 
news:[EMAIL PROTECTED]:

> Yeah.. I'm with you.. I don't really know what all of this is about - I
> like the way the Postgres mailing list works as it is Are any of the
> changes being discussed here going to change the content or how we
> receive the mailing lists?..

As far as i think:
There will be no change to how the system is today. PostgreSQL mailing 
lists is already gatewayed to news server all of the world. The process 
which is ongoing only make the existing lists on usenet more approved and 
therefor even more servers will caryy them. 

Today we who want to access the lists through a news server need to connect 
to news.postgresql.org or find another provider who support the 
comp.databases.postgresql.*. 

-- 
Rolf Østvik

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [GENERAL] Important Info on comp.databases.postgresql.general

2004-11-13 Thread Rolf Østvik
[EMAIL PROTECTED] (Jeff Eckermann) wrote in 
news:[EMAIL PROTECTED]:
> --- "Gary L. Burnore" <[EMAIL PROTECTED]> wrote:
>> Please.  We're trying to help you fix something
>> that's broken. 
> 
> ???  As a longstanding reader of the pgsql-
> mailinglists, (including via news.postgresql.org on
> occasion), all I see is some outsiders trying to help
> us "fix" a problem that does not exist.  And yes, I

I think it's a problem. Not a big one, but still a problem.

> have read most of the messages that have passed by in
> these threads.  After all that, I still don't see the
> benefit.
> 
> Perhaps that is why these conversations have been
> carried on almost totally by people who do not post to
> the pgsql lists.
>  

Or maybe that some of us longstanding (ok, only 4 years for my part) 
readers of pgslq-mailinglist like the proposal and just follow the 
discussion.

By the way, from the header of your post i think that the only audience for 
your post is those who are members of the mailinglist and not so many 
others.

Today everyone can access the news.postgresql.org server and the list is 
carried by some other news providers also. The benefit is that all 
potential new users would have better possibility of using their preffered 
news server to access the groups.
(Well, you may not think that beneficial but i do).

I have seen some discussion about the technicality of gatewaying and of the
filtering of spam which is on post from the news side to the mailinglist 
side. 
Otherwise haven't I seen any disadvantages with getting some of the groups 
"approved".

-- 
Rolf Østvik

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [GENERAL] I'm about to release the next postgresql RFD. Comments wanted.

2004-11-13 Thread Rolf Østvik
Mike Cox <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]
berlin.de:

> Obviously, there cannot be 21 postgresql groups in the comp.* hierarchy. 

I agree

> I did a check on news.postgresql.org to see which newsgroups are the most
> popular and also the ones which cover the relevant postgresql topics.  
> Most of the postgresql topics and traffic are represented in these four
> newsgroups:
> 
> comp.databases.postgresql.admin
> comp.databases.postgresql.general
> comp.databases.postgresql.hackers
> comp.databases.postgresql.sql
> 

What about 
comp.databases.postgresql.novice

I think that group could be of general interest and it has a fair amount of 
traffic.

-- 
Rolf Østvik

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [GENERAL] 3rd RFD: comp.databases.postgresql (was:

2004-12-04 Thread Rolf Østvik
[EMAIL PROTECTED] ("Marc G. Fournier") wrote in 
news:[EMAIL PROTECTED]:

> On Fri, 3 Dec 2004, Net Virtual Mailing Lists wrote:
> 
> this RFD in no way affects the mailing lists, and is in no way an 
> 'official PostgreSQL newsgruop' ... the 'official newsgroups' are the 
> gated ones under pgsql.* ...
> 

I am curious. Where can i learn about these 'official newsgroups'?
I can't find any information about them on www.postgresql.org.

Could it be put up some information of those groups on the websit. And also  
information about the new comp.databases.postgresql when(if) it becomes 
approved.


I don't remember how i learnt that they existed when i started to use them
(when they was in comp.databases.postgresql.*) and that i had to connect to 
news.postgresql.org to read them. I think that i picked it up reading the  
mailing list.

-- 
Rolf Østvik

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [GENERAL] 3rd RFD: comp.databases.postgresql (was:

2004-12-05 Thread Rolf Østvik
[EMAIL PROTECTED] ("Marc G. Fournier") wrote in 
news:[EMAIL PROTECTED]:

> On Sat, 4 Dec 2004, Rolf Xstvik wrote:
> 
>> I am curious. Where can i learn about these 'official newsgroups'?
>> I can't find any information about them on www.postgresql.org.
> 
> http://archives.postgresql.org/pgsql-announce/2004-11/msg00011.php
> 
> I'm going to post that once a month so that new ppl know as well, so if 
> anyone has any revisions they'd like to submit, please do ...

And this will be posted to the mailing list? (and to pgsql.*)

If i am looking for a usenet group then i don't want to read a mailing 
list. And if i am a new user, how can i easily find out that pgsql.* is the 
hierarchy i am looking for.

Could it be an idea to mention it on the same web page which contain 
information about the mailing lists?

-- 
Rolf Østvik

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])