determine the curval() of a view

From: John <johnf(at)jfcomputer(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: determine the curval() of a view
Date: 2010-03-02 15:35:42
Message-ID: 201003020735.42499.johnf@jfcomputer.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I am working with a view that has a "_INSERT" rule. I'm wondering if there is
a way to determine what the curval() of the PK (serial type) after an insert
occurs.

Given the name of the view I'd like to determine the sequence associated with
the view's PK. Actually, I wonder if it is even possible to determine the PK
from the view name. I'm guessing that it might be possible because the view
must be associated with a table/s. And they will have PK's.

Any hints will be very helpful.

Johnf

Browse pgsql-sql by date

  From Date Subject
Next Message Louis-David Mitterrand 2010-03-03 15:02:27 check constraint on multiple tables?
Previous Message Craig Ringer 2010-03-02 12:07:56 Re: kind of RULE on SELECT depending on existence of a WHERE condition