2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2005-06-24 09:11:47 +00:00
|
|
|
<!-- $Revision: 1.8 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 -->
|
2005-03-08 00:06:33 +00:00
|
|
|
<refentry id="function.pg-last-oid">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>pg_last_oid</refname>
|
|
|
|
<refpurpose>Returns the last object's oid</refpurpose>
|
|
|
|
</refnamediv>
|
2005-03-11 16:03:26 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2005-03-08 00:06:33 +00:00
|
|
|
<methodsynopsis>
|
2005-06-24 09:11:47 +00:00
|
|
|
<type>string</type><methodname>pg_last_oid</methodname>
|
2005-03-08 00:06:33 +00:00
|
|
|
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
<function>pg_last_oid</function> is used to retrieve the
|
|
|
|
<varname>oid</varname> assigned to an inserted tuple (record) if
|
|
|
|
the result resource is used from the last command sent via
|
|
|
|
<function>pg_query</function> and was an SQL INSERT. Returns a
|
2005-06-24 09:11:47 +00:00
|
|
|
positive number if there was a valid <varname>oid</varname>. It
|
2005-03-08 00:06:33 +00:00
|
|
|
returns &false; if an error occurs or the last command sent via
|
|
|
|
<function>pg_query</function> was not an INSERT or INSERT is
|
|
|
|
failed.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
OID field became an optional field from PostgreSQL 7.2. When
|
|
|
|
OID field is not defined in a table, programmer must use
|
2005-04-27 14:20:09 +00:00
|
|
|
<function>pg_result_status</function> to check if record
|
2005-03-08 00:06:33 +00:00
|
|
|
is inserted successfully or not.
|
|
|
|
</para>
|
|
|
|
<note>
|
|
|
|
<para>
|
2005-04-21 09:29:36 +00:00
|
|
|
This function used to be called <function>pg_getlastoid</function>.
|
2005-03-08 00:06:33 +00:00
|
|
|
</para>
|
|
|
|
</note>
|
2005-03-11 16:03:26 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
2005-03-08 00:06:33 +00:00
|
|
|
<para>
|
2005-03-11 16:03:26 +00:00
|
|
|
<simplelist>
|
|
|
|
<member><function>pg_query</function></member>
|
|
|
|
<member><function>pg_result_status</function></member>
|
|
|
|
</simplelist>
|
2005-03-08 00:06:33 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|