Re: Where pg saves the next OID?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/8/5 Nelson Gonzaga <ngonzaga@xxxxxxxxx>:
> Hi all,
> Where postgresql saves the next OID to be used in any record?
> I need to read it and use in a temporary field (unique) until the user put
> the correct value, I don't want to use sequences because only a few records
> it will be used.
> Now I'm using the current_time function to do it.
> tks,
> Nelson Gonzaga
>

I don't recommend OID. Instead, use CTID.

I don't know for what purposes you need that number, but
ctid is a  good option for have a tuple reference.
ctid is like (15,3) (15,4) etc...

If you do select max(ctid) from xxx; you will have the last ctid.

If you put an example of what you want to do, maybe i can
tell you how use this attrib.

-- 
              Emanuel Calvo Franco
      www.emanuelcalvofranco.com.ar

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux