A couple of newbie questions ...

From: admin <mick(at)mjhall(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: A couple of newbie questions ...
Date: 2008-07-23 09:48:15
Message-ID: 4886FE5F.80102@mjhall.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've worked as a web developer on mostly small business websites for the
past seven years, and while I've had some limited experience with older
versions of PostgreSQL (7.* ??), I've mostly used MySQL all this time.

I now work for local govt and am building a large intranet-like system
which ultimately could provide storage for and various interfaces to a
significant proportion of my organisation's data including financial data.

I'm convinced that PostgreSQL's performance is not an issue (both
because it's improved and traffic will be relatively low anyway), and
that the benefits of PostgreSQL's advanced features are too good to
ignore. I'm hoping to shift quite a bit of data processing into the
database.

So anyway, life story aside, I have a couple of very newbie questions
after tinkering with PostgreSQL 8.1.9 for a day converting some
PHP/MySQL code:

1. Is a SEQUENCE what I use instead of auto_increment?

2. Does this work in PostgreSQL:

INSERT INTO table VALUES ('x','y','z')

or do I need to do this

INSERT INTO table (fld_x,fld_y,fld_z) VALUES ('x','y','z')

?

3. Does this work in PostgreSQL:

INSERT INTO table VALUES ('','y','z')

where the empty first item is intended for an auto_increment/SEQUENCE id
field?
If not, what is an alternative?

Thanks
Mick

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2008-07-23 10:01:13 Re: A couple of newbie questions ...
Previous Message Emil Pedersen 2008-07-23 09:32:42 Re: inconsistent program behavior, fresh eyes needed