Re: PostgresQL equivalent of NOCOUNT

From: "Dwayne Miller" <dmiller(at)espgroup(dot)net>
To: Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgresQL equivalent of NOCOUNT
Date: 2001-08-15 00:22:31
Message-ID: 3B79C0C7.1090102@espgroup.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jochem van Dieten wrote:

> Dwayne Miller wrote:
>
>>
>> SELECT nextval('mysequence') AS PKEY FROM DUAL;
>> ...
>> Your inserts and updates using #queryname.pkey#
>
>
> I know, but it has 2 queries again, which is exactly the reason why I
> don't want it (I am actually developing this to be used by others).
> BTW, you can just call functions without a FROM, as in:
> SELECT now() AS test

Not very portable... which was a requirement for me.

I generally have to use the same key in a series of 1 to 3 inserts, so
this solution seems to work well.

>
>> One solution of many
>
>
> I think I will just replace cfquery with cf_query. Then have cf_query
> replace every insert with a function call (so I don't have to double
> all the quotes manually), where the function takes care about the rest
> and returns #insertedrecord.id# or whatever. Would probably be the
> easiest way to explain to others.
>
> Jochem
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Josh Rovero 2001-08-15 00:48:23 Re: Printable report generation
Previous Message Joseph Shraibman 2001-08-14 23:53:23 dump/restore failing in 7.1.2