Re: [DOCS] psql man page error?

2006-12-06 Thread Peter Eisentraut
Am Dienstag, 5. Dezember 2006 18:41 schrieb Bruce Momjian:
>   psql, like this: echo "\x \\
>   select * from foo;" | psql.
>
> and I suppose the asumption was that the \\ would be at the end of the
> output line, but in fact both HTML and manual pages just put the \\
> anywhere on the line.

Which is correct.  Removing the \\ alters the point of the example.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

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


Re: [DOCS] psql man page error?

2006-12-06 Thread Bruce Momjian
Peter Eisentraut wrote:
> Am Dienstag, 5. Dezember 2006 18:41 schrieb Bruce Momjian:
> >   psql, like this: echo "\x \\
> >   select * from foo;" | psql.
> >
> > and I suppose the asumption was that the \\ would be at the end of the
> > output line, but in fact both HTML and manual pages just put the \\
> > anywhere on the line.
> 
> Which is correct.  Removing the \\ alters the point of the example.

Well, if it doesn't render \\ at the end of the line, the example isn't
very clear unless you are looking at the SGML.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

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

   http://www.postgresql.org/docs/faq


Re: [DOCS] psql man page error?

2006-12-06 Thread Bruce Momjian
Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > Well, it is even worse because some versions of echo automatically
> > interpret backslashes, so it would have to be \\x.  I am thinking we
> > should just leave it as I have it now, unless we want to use 'awk' or
> > 'perl' where we know the backslash behavior.
> 
> The example as you have it now is directly contradictory to the
> published spec.
> 
> I agree with Simon's suggestion to remove "-e" from the example
> (thereby making it spec-compliant) and add a parenthetical remark
> suggesting that standards-challenged versions of echo might need "-e".

Well, I just tried Linux and FreeBSD bash (the default shell?) and they
both need '-e' to render '\n' as a newline, so I think we should just
leave it with '-e'.  Following the spec doesn't help if our two major
operating systems don't follow the spec, plus the example doesn't work
on Win32 at all.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

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

   http://www.postgresql.org/docs/faq


Re: [DOCS] psql man page error?

2006-12-06 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes:
> Peter Eisentraut wrote:
>> Which is correct.  Removing the \\ alters the point of the example.

> Well, if it doesn't render \\ at the end of the line, the example isn't
> very clear unless you are looking at the SGML.

No, you've completely misunderstood the original example.  It's
intending to show a backslash-backslash terminator for the \x command,
not two lines of input, ie the equivalent of this:

regression=# \x \\ select 1,2;
Expanded display is on.
-[ RECORD 1 ]
?column? | 1
?column? | 2


regards, tom lane

---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate


Re: [DOCS] psql man page error?

2006-12-06 Thread Bruno Wolff III
On Wed, Dec 06, 2006 at 09:14:01 -0500,
  Bruce Momjian <[EMAIL PROTECTED]> wrote:
> 
> Well, I just tried Linux and FreeBSD bash (the default shell?) and they
> both need '-e' to render '\n' as a newline, so I think we should just
> leave it with '-e'.  Following the spec doesn't help if our two major
> operating systems don't follow the spec, plus the example doesn't work
> on Win32 at all.

If you need several lines of output, couldn't you use one echo for each
line and separate them with semicolons?

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


Re: [DOCS] psql man page error?

2006-12-06 Thread Bruce Momjian
Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > Peter Eisentraut wrote:
> >> Which is correct.  Removing the \\ alters the point of the example.
> 
> > Well, if it doesn't render \\ at the end of the line, the example isn't
> > very clear unless you are looking at the SGML.
> 
> No, you've completely misunderstood the original example.  It's
> intending to show a backslash-backslash terminator for the \x command,
> not two lines of input, ie the equivalent of this:
> 
> regression=# \x \\ select 1,2;
> Expanded display is on.
> -[ RECORD 1 ]
> ?column? | 1
> ?column? | 2

You are right, I totally misunderstood it.  New patch applied, that
mentions \\ is a separator meta-command.  I now see \\ documented
farther down the file.  I didn't know it did that.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/ref/psql-ref.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.176
diff -c -c -r1.176 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml	5 Dec 2006 17:40:55 -	1.176
--- doc/src/sgml/ref/psql-ref.sgml	6 Dec 2006 15:37:30 -
***
*** 87,95 
it contains no psql specific features),
or a single backslash command. Thus you cannot mix
SQL and psql
!   meta-commands. To achieve that, you could pipe the string into
!   psql, like this: echo -e
!   "\\x\nSELECT * FROM foo;" | psql.


 If the command string contains multiple SQL commands, they are
--- 87,96 
it contains no psql specific features),
or a single backslash command. Thus you cannot mix
SQL and psql
!   meta-commands with this option. To achieve that, you could
!   pipe the string into psql, like
!   this: echo "\x \\ SELECT * FROM foo;" | psql.
!   (\\ is the separator meta-command.)


 If the command string contains multiple SQL commands, they are

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [DOCS] psql man page error?

2006-12-06 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes:
> !   pipe the string into psql, like
> !   this: echo "\x \\ SELECT * FROM foo;" | psql.

This should probably use single quotes not double, hm?

regards, tom lane

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [DOCS] psql man page error?

2006-12-06 Thread Bruce Momjian
Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > !   pipe the string into psql, like
> > !   this: echo "\x \\ SELECT * FROM foo;" | psql.
> 
> This should probably use single quotes not double, hm?

Yep, done.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/ref/psql-ref.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.177
diff -c -c -r1.177 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml	6 Dec 2006 15:40:11 -	1.177
--- doc/src/sgml/ref/psql-ref.sgml	6 Dec 2006 15:46:30 -
***
*** 89,95 
SQL and psql
meta-commands with this option. To achieve that, you could
pipe the string into psql, like
!   this: echo "\x \\ SELECT * FROM foo;" | psql.
(\\ is the separator meta-command.)


--- 89,95 
SQL and psql
meta-commands with this option. To achieve that, you could
pipe the string into psql, like
!   this: echo '\x \\ SELECT * FROM foo;' | psql.
(\\ is the separator meta-command.)



---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate


[DOCS] create index concurrently docs ...

2006-12-06 Thread James Robinson
In reading over the caveats regarding create index concurrently, I  
think it'd be nice to see an example of what the return result will  
be if an 'invalid' index is created so a dba who read the docs night  
recognize the error, as well as for searchengine fodder to find out  
what to do real fast if such an error happens to them.


Something around this paragraph in http://www.postgresql.org/docs/ 
current/static/sql-createindex.html#SQL-CREATEINDEX-CONCURRENTLY:


"If a problem arises during the second scan of the table, such as a  
uniqueness violation in a unique index, the CREATE INDEX command will  
fail but leave behind an "invalid" index."


Thanks!

James Robinson
Socialserve.com


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

  http://www.postgresql.org/docs/faq


Re: [DOCS] 8.2.0 pdf

2006-12-06 Thread Devrim GUNDUZ
Hi,

On Mon, 2006-12-04 at 11:46 +0200, Devrim GUNDUZ wrote:
> I'm building 8.2.0 pdf now. It may take 3-4 days.

Ok, it is done. I'm now committing it to CVS. It will appear in web page
soon.

Regards,
-- 
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/






signature.asc
Description: This is a digitally signed message part


Re: [DOCS] 8.2.0 pdf

2006-12-06 Thread Michael Glaesemann


On Dec 7, 2006, at 15:16 , Devrim GUNDUZ wrote:


Hi,

On Mon, 2006-12-04 at 11:46 +0200, Devrim GUNDUZ wrote:

I'm building 8.2.0 pdf now. It may take 3-4 days.


Ok, it is done. I'm now committing it to CVS. It will appear in web  
page

soon.


Thanks, Devrim, for putting this together and your patience :). I'm  
sure people will find it useful.


Michael Glaesemann
grzm seespotcode net



---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [DOCS] 8.2.0 pdf

2006-12-06 Thread Oleg Bartunov

On Thu, 7 Dec 2006, Devrim GUNDUZ wrote:


Hi,

On Mon, 2006-12-04 at 11:46 +0200, Devrim GUNDUZ wrote:

I'm building 8.2.0 pdf now. It may take 3-4 days.


Ok, it is done. I'm now committing it to CVS. It will appear in web page
soon.


Devrim, could you share your texmf.cnf ? My pdf creation failed even if
I increased memory setting as it's recommended in jadetex installation.



Regards,



Regards,
Oleg
_
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

   http://www.postgresql.org/about/donate