Skip site navigation (1) Skip section navigation (2)

Re: driver source code indentation

From: "Dave Cramer" <Dave(at)micro-automation(dot)net>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: driver source code indentation
Date: 2001-09-06 11:06:29
Message-ID: 002801c136c3$fb618740$8201a8c0@inspiron (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
This does look good, 

I personally prefer more whitespace

After ( and , as well as moving the opening brace to the next line.

Public int foo(int x,int y){

Turns into 

Public int foo( int x, int y )
	x = y;

I find this easier to read.



-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Bruce Momjian
Sent: September 4, 2001 3:26 PM
To: Liam Stewart
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] driver source code indentation

> I suggest that the JDBC driver adopt PostgreSQL's indentation 
> standards
> (see PostgreSQL developers FAQ, question 1). I see that some source
> files have used this standard, but the vast majority do not. We should
> have a standard for consistency and our own sanity if nothing else.

Glad someone brought this up.  A while ago I wrote:
	I tried pgindent but it doesn't understand Java and made a mess
of it. 
	I used astyle with the options:
	        $ astyle --style=java -j *.java
	I have the reformatted jdbc files at:
	I must say it looks very good.

Can people tak a look at that and see if they like it?  I will work on
astyle to find a format that matches the main code indenting.

If you like it, I will indent just after we go beta.

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

In response to


pgsql-jdbc by date

Next:From: Gunnar RønningDate: 2001-09-06 12:18:09
Subject: Re: JDBC patch procedures (Re: [PATCHES] Patch for jdbc2
Previous:From: Tom LaneDate: 2001-09-06 03:41:30
Subject: JDBC patch procedures (Re: [PATCHES] Patch for jdbc2

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group