I defined a function, count_nonnull, to return 1 if not null, 0 otherwise.
Then I defined a corresponding unary operator <~~. I wanted it for
expressions like <~~ item_1 + <~~ item_2. But because precedence of
user-defined ops is pretty low, I had to rewrite this as <~~(item_1) +
<~~(item_2), w
I want to retrieve the primary key, which is a SERIAL, of a row I just
inserted.
In 8.2, I could use RETURNING, but I'm using 8.1.
Reading around, I've seen the following methods discussed:
(1) Within a transation, do the INSERT, and then do a SELECT CURVAL
(2) Not necessarily within a transact
"woger151" <[EMAIL PROTECTED]> writes:
I assume it's harmless to drop the database named "postgres" (named after
the DB superuser)?
You might want to recreate it afterwards, since various tools expect it
to be there (for instance createdb, createuser, "psq
I assume it's harmless to drop the database named "postgres" (named after
the DB superuser)?
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
- Original Message -
From: "Bill Moran" <[EMAIL PROTECTED]>
To: "woger151" <[EMAIL PROTECTED]>
Cc:
Sent: Wednesday, January 03, 2007 10:09 AM
Subject: Re: [GENERAL] superuser authentication?
In response to Tom Lane <[EMAIL PROTECTED]>:
- Original Message -
From: "Tom Lane" <[EMAIL PROTECTED]>
To: "woger151" <[EMAIL PROTECTED]>
Cc:
Sent: Wednesday, January 03, 2007 9:52 AM
Subject: Re: [GENERAL] superuser authentication?
"woger151" <[EMAIL PROTECTED]> writes:
Wh
I'm setting up postgresql (8.1) on what I hope to be a very secure server
(SUSE Linux 10.1).
Only authentication allowed by anyone is 'local' (unix-domain sockets).
Most users I plan on authenticating by PASSWORD (web connections are made to
an apache webserver over SSL; the actual postgresql