在postgresql 9中添加新关键字

时间:2017-10-22 18:15:52

标签: c++ postgresql keyword

我想在postgresql中添加新关键字MAKE。我在kwlist.h中添加了这个语句 PG_KEYWORD(“make”,MAKE,RESERVED_KEYWORD)

并在2-3个地方的gram.y文件中定义它。但它显示了这个错误 -

from google.cloud import pubsub_v1
import time
import os
import sys
import datetime
import httplib2
from oauth2client import client
import string


project = 'xxx'
topic_name = 'my-new-topic'

from google.cloud import logging

logging_client = logging.Client()
log_name = 'xxx'
logger = logging_client.logger(log_name)

engine = create_engine('xxx')

# The data to log
text = '################### STARTING GCE ###################'

# Writes the log entry
logger.log_text(text)


print('Logged: {}'.format(text))

subscriber = pubsub_v1.SubscriberClient()
topic_path = subscriber.topic_path(project, topic_name)

for subscription in subscriber.list_subscriptions(topic_path):
    print(subscription.name)


def receive_messages(project, subscription_name):
    """Receives messages from a pull subscription."""
    subscriber = pubsub_v1.SubscriberClient()
    subscription_path = subscriber.subscription_path(project, subscription_name)

    def callback(message):
        print(str(datetime.datetime.now()))
        print('Received message: {}'.format(message))
        message.ack()

    subscriber.subscribe(subscription_path, callback=callback)

    # The subscriber is non-blocking, so we must keep the main thread from
    # exiting to allow it to process messages in the background.
    print('Listening for messages on {}'.format(subscription_path))
    while True:
        print('while loop: ', str(datetime.datetime.now()))
        time.sleep(60)



receive_messages(project, 'test')

任何人都可以帮助我吗???

0 个答案:

没有答案