git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: d00b272) | patch
I noticed that pltcl didn't have any way to get to SPI_lastoid like plpgsql does...
Thu, 2 Aug 2001 15:45:55 +0000 (15:45 +0000)
Thu, 2 Aug 2001 15:45:55 +0000 (15:45 +0000)
commit 84d2c518fe24e5b95b8113ff175ac5c13d2869d2
I noticed that pltcl didn't have any way to get to SPI_lastoid like plpgsql does.. I started using pltcl a lot because I like to decide when and how my queries get planned.. so I put one together really quick

Sorry I don't have the original around to make a quick diff, but its a very small change... I think this should be in the next release, there's no reason not to have it.

its a function with no expected arguments, so you can use it like:
spi_exec "INSERT INTO mytable(columns...) VALUES(values..)"
set oid [spi_lastoid]
spi_exec "SELECT mytable_id from mytable WHERE oid=$oid"

It just didn't make sense for me to use plpgsql and pltcl, or just screw
them both and use SPI from C.

bob@redivi.com
doc/src/sgml/pltcl.sgml diff | blob | blame | history
src/pl/tcl/pltcl.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /